Electrical on 2003 Jaguar

the light for overheated engine comes on but the engine isn’t over heated. I can pull over turn the engine off and turn back on and the car is fine. This doesn’t happen all the time and don’t know when it is going to happen except when it does happen. I have had the relay switch replaced, a new water pump. Any suggestions

You need a mechanic who can test and troubleshoot. I know that this isn’t a surprise; but, it’s still true, isn’t it? Ask around for such a critter (a qualified mechanic).

The trouble may be with the sensor that activates the warning light or there couls be a problem with the wiring to the sensor. I assume you have a temperature gauge to refer to about the real engine temperature and not just a warning light.

The problem is that the temperature gauge on the dash indicates water temperature. The light indicates a problem with water temperature or with head temperature. It’s possible for a head to overheat due to trapped air while the water temperature is still correct.
That said, there is a known problem with the wiring to the head temperature sensors shorting, and this may be the OP’s problem.