Engine idles rough till it stalls

I have an 01 olds alero, I been having problems with the engine stalling out. i was told it may need a new fuel filter so I replaced filter and now it idles rough till it stalls. Does anyone have any ideas what to do next? I replaced the plugs 2 years ago also. Thanks for any help.

check the MAP sensor vacuum hose, as those are reportedly prone to failure in the 2.4 engine, resulting in a vacuum leak that will cause the engine to run poorly.

If the hose is OK, check the idle air control (IAC) valve, which may need cleaning or replacement.

Also check the spark plugs and wires. A fouled/cracked plug or a shorting ignition wire could also be at fault.