I would start by cleaning the throttle intake and butterfly flap. Also remove and clean the idle control valve. Both easy jobs. You may have a split or collapsed engine breather hose . This needs the inlet manifold removed for access.
The egr valve sits on the top of the engine, next to coil pack . Idle control valve is bolted to the side of the throttle body. I would also check the engine Ecu memory fuse in the engine bay fuse box . If I recall , it’s a 3 amp purple colour .