Welcome to TRS
The engine computer(PCM) has two software routines it runs
Open Loop
Closed Loop
Open loop is what boots up when you turn on the key
Open loop uses preset air/fuel mix tables for the engine size(2.3l) programmed into it at the factory
PCM uses engine RPM and throttle position to "look up" correct air/fuel mix to use in the tables
Part of Open loop is Choke mode, PCM uses an engine temp sensor(ECT) to determine how Rich to run the engine based on Coolant temp
This offsets the tables air/fuel mix on the Rich side
MAF sensor is used but doesn't effect air/fuel that much in Open loop
BUT..........if there is no MAF sensor signal(unplugged) PCM will stay in Open Loop.........forever, which runs a Rich mix to avoid engine damage from a too Lean Mix, so poor MPG
Closed loop is used for "on the fly" air/fuel mix calculations, the point of using a computer to begin with, lol.
Closed Loop runs engine more efficiently, best MPG and power.
Use of the O2 sensor(s), is the big difference between Open and Closed Loop, Open Loop ignores O2 sensor(s)
To do "on the fly" air/fuel calculations the computer needs Feedback on those calculations, is the mix too Rich or too Lean
An O2 sensor sees Oxygen in the exhaust, it uses a chemical reaction to to this.
Too much Oxygen is Lean exhaust, too little is Rich exhaust, this is the Feedback the computer needs
Problem with O2 sensors is that they don't working until they get above 650degF, the chemical reaction doesn't work unless its VERY HOT, so all O2 sensors are heated, but still need exhaust heat to get that HOT
So Open Loop runs until engine AND O2 sensor gets hot, this can take 5 to 10 minutes depending on outside temp
Your issue as described reads like the problem comes with Closed Loop operation
Unplugging the MAF sensor just prevents the switch to Closed Loop
Since you don't know the age of the O2 sensor, it may need to be changed, old and out of chemicals or ??, they rarely fail but do need to be changed every 150k miles
But you should have a Check engine light(CEL) if O2 is not working well
And this could also be a computer issue, did you buy the Ranger "as is", not running well?
Does the CEL come on with the key, it should, and then go off after engine starts?
If it doesn't come on then bulb may be burned out or..................previous owner disconnected it
Is the temp gauge on the dash working?
Does it get above 1/3 after a few minutes driving?