96 ford ranger rough idle

96 ford ranger struggles to start, after starting it will do one of 2 things idle rough and struggle and die upon applying throttle, or it will idle and sputter out and die on its own, I have no codes coming up, and the fuel pump is good along with fuel pressure

Probably a bad MAF sensor, try it with the MAF unplugged. Improvement would indicate a bad signal from the sensor.

When was the last major tune up performed on that old vehicle? Start w/the basics before going on to other components

Replace the plugs, cap, rotor, wires, fuel filter and air filter. Check for a vacuum leak. Check timing if you get it to idle.

No

EGR valve stuck open…

Check/clean the IACV which the PCM uses to control idle speeds and can cause stalling if clogged up/defective… Likely due for cleaning on a high mileage engine,… Also check for vacuum or air intake leaks. Possibly also the EGR is stuck open… Inspect/test and clean passages… Or fuel /vapor leaks from a bad purge valve/solenoid in the EVAP system or fuel leaks from a bad fuel pressure reg into the vacuum hose to it which may be allowing too much unmetered fuel/vapors into the engine and can cause rough idle / stalling. A faulty ECT… Coolant temp sensor. May also cause stalling if it sends bad voltage data and tells the PCM that the engine is warmed up when actually cold… A cold engine needs a slightly richer fuel mixture than a warmed up one. Test the ECT for proper voltage readings at various engine temps. Some issues like a bad ECT or IACV may not trip a trouble code so it will not help to look for stored codes.

Diesel = EGR valve