That is surprising considering the codes. Both could cause your issue.
P0506 is an OBD-II trouble code meaning the
Idle Air Control (IAC) System's RPM is lower than expected, often causing rough idling or stalling, especially when shifting or at low speeds, as the Powertrain Control Module (PCM) detects the engine speed dropping below its programmed limit. Common causes include a dirty throttle body, carbon buildup in the IAC valve, vacuum leaks, or faulty sensors (like the Throttle Position Sensor), with solutions often involving cleaning or replacing these components to restore proper idle.
A P0420 code means the
catalytic converter on "Bank 1" is not working efficiently, based on signals from the
oxygen sensors. While it most often points to a faulty catalytic converter, other potential causes include exhaust leaks, bad oxygen sensors, or engine problems like misfires or fuel mixture issues. The check engine light will illuminate, and the vehicle may experience poor fuel economy or a rotten egg smell from the exhaust