Not much info?
1989 Ranger 2.3l was still using the Speed Density system for fuel control, it will have a MAP sensor located on the firewall usually behind the wiring harness, it is small, maybe 2" square, and it will have electrical connector and Vacuum Hose, vacuum hose is the best way to find it.
Hose runs from intake manifold to MAP sensor.
make sure the hose is good, air tight no cracks
Check electrical connection, make sure it is clean and dry.
There is also the Throttle Position sensor(TPS), it is located on the throttle plate(opposite throttle cable).
Check it's connector, clean and dry, also check the wires are not frayed or loose.
When you press on the gas pedal the computer gets the signal you want to increase RPMs from TPS, the vacuum at the MAP sensor falls when throttle plate opens which allows computer to calculate(guess, lol) how much extra fuel will be needed.
It could also be that the computer itself is going bad, unhook the battery for 5 minutes, then hook it back up, that will cause the computer to reboot next time you start the engine.
You know how some computers/smartphones can lock up, and rebooting/removing battery, can get them back up and running..........well that is worth a try on automotive computers as well.
Is the Check Engine Light(CEL) on?