A faulty EGR valve can cause overheating. The associated pipework can block up too and also cause overheating.
It’s a nasty system and the main purpose is to get cars past emissions regulations. Look at it this way, your engine burns fuel then tries to get rid of the smoke out the exhaust. The EGR then puts some of that smoke back into the engine to try to burn it again. Which means you could be pumping carbon, oil and all other sorts of nasty crap back into your engine again, which can never be a good thing.
While not strictly legal, often the best thing to do, especially on Diesel engines, is to blank off all the EGR components, and if it’s a newer car, have it mapped out of the ECU.