Welcome to TRS
1988 2.3l Lima engine, last year with a distributor and 4 spark plugs, 1989 -1997 2.3l used Dual spark plug heads and ICM(distributorless) spark system
Lima engine was first used in 1974 Pinto, so nicknamed "pinto engine"
It was used in Rangers from 1983 to 1997 as the 2.0l and 2.3l versions, and a 2.5l from 1998-2001
Rangers got a newer 2.3l Duratec Mazda L engine in late 2001 so if you do searches for "Ranger 2.3l" you will get conflicting info, best to use "Ranger 2.3l Lima", but 1989-1997 2.3ls will be different than yours
You have a TFI ignition module on the distributor, info here:
https://therangerstation.com/tech_library/TFI_Diagnostic.shtml
The computer controls the air:fuel mix using MAP sensor and then an O2 sensor on exhaust
And the computer controls the idle, its uses the IAC(idle air control) Valve located on the upper intake next to throttle plate
IAC Valve has a two wire plug in, it can be cleaned to correct poor idling, and tested to make sure it is working
Remove IAC Valve, 2 bolts, disconnect 2 wire connector
Turn key on
Look inside IAC Valve, and plug in 2 wire connector, you should see Valve move, only moves 3/8" but should move
Unplug wire and it should close, plug it in again, repeat until you are satisfied it is working or is not working
If its not working use volt meter on the 2 wires, should be 10-12volts with key on engine off
If there is above 10volts then replace IAC Valve
If no or low volts its a wiring or computer issue
MAP sensor is usually located on the firewall behind wiring, small black device with a Vacuum hose and 3 wire connector
Vacuum hose runs to the upper intake manifold, check that the hose is "air tight" no cracks or breaks
MAP sensor is hard to test but can cause rough idle, but usually there would also be driving issues as well, stumbling or bogging down