Make sure this is the only code the computer is throwing; otherwise, look first into the other codes. A blocked EGR valve can cause combustion temperatures to rise, creating a lean condition and raising exhaust temperature. This prevents the cat from working properly. If the EGR issue has been fixed (intake and valve passages clear, and the temperature is back to normal), try clearing computer codes as a P0420 can be the result of the previous issue.
If that doesn’t fix the problem, it’s possible the cat or one or more O2 sensors are covered with carbon deposits. Sometimes a cat cleaner will do the job, but you need to check if the sensors are still working correctly. Otherwise, the problem with the cat is more serious.
Maybe this other post can help: