Check for a clean & snug connection at the push-on lead for the temp sender, right behind the thermostat housing on the top.
If it's history, consider putting on a new connector and replacing the sender. If it's corroded, scrap/clean it and the threaded post on the sender.
Carefully reduce the size by squeezing it down via your favorite clamping tool and then push it back on.
If that connection is not the issue, then it sounds like you've got air in the system.