Hey Scotty, I have a 2011 Hyundai Sonata with about 162,000 miles on the odometer. Due to several of the recalls for this car, the engine was replaced years ago. Fast forward now, the engine temperature is now running hot when the car is idling and it is cooling only when the car is moving at a high rate of speed. I had the thermostat, coolant and some gasket replaced. What else can be the issue and should I go ahead start looking for a newer car?
Are you losing coolant? That would make you suspect a head gasket leak.
But if it's fine when moving and overheating while idling,
do what @justin-shepherd says, make sure your cooling fans are working
Are your cooling fans working properly?
You will eventually blow your head gasket if it runs much past the middle of your gauge. If that happens, or has happened, it's cheaper to get another car than it is to fix yours.
Check if the head gasket is blown by renting a head gasket tester and special fluid at AutoZone. Follow the instructions on the tool.