make sure it's contacts are clean and dry.
Test it with a meter to make sure it's working.
It does not sound like "sharking" the car only cools when it's moving, which would lead you to suspect the fan clutch or pump impeller.
Trapped air would heat up at idle....I know, sent hours fiddling around after a coolant flush. And if it did drive, the expansion tank level would drop as the coolant replaced the air over a few days of driving.