Yes, exactly, the change of wind direction is the cause for your sudden increase of IAS.
I have marked your aircraft heading with a magenta arrow and the direction the wind comes from with a brown arrow. So, you are going 140 KIAS at this moment and you have a steady 5 knot tailwind. That means you have a GS of roughly 145 kts (we will ignore air density and that it's not a perfect tailwind in this example).
Now the wind direction changes all of a sudden.
You have now got a nearly direct headwind. That means there are in total 10 kts more worth of air going into your pitot tube and thus indicating 150 KIAS. That's because your aircraft lost the 5 knots tailwind and at the same time got a 5 knot headwind. Because of the fast wind direction change, the aircraft kept its "momentum" and the airspeed increases by double the wind speed.