Just change MAF sensor
I see you don't have any replies yet so will see if I can get things started. Lots of unknowns, so I have more questions than suggestions at this point but they're intended to try & help the forum get some clues that might help us begin to get our minds wrapped around the root cause of your problem, so we can suggest a fix-it trouble shoot.
Use, borrow, or come by a code reader, or ELM scan-tool, plugged into the in cabin DLC = Data Link Connector, located under dash just left of the steering wheel & running FORScan diagnostic freeware that's tweaked for Fords, on the viewing device of your choice, as discussed here Low Cost ELM Scantool - Ford Truck Enthusiasts Forums (ford-trucks.com). Have it scan for trouble codes, as this low cost but powerful combo can query All of your 2002 Ranger computer / controllers for trouble code clues. Post All trouble code Numbers, as they can often provide good trouble shooting clues that can help focus a trouble shoot.
It might be helpful to know which engine & transmission, 2 or 4 wheel drive & cab type your 2002 Ranger has, what kind of engine Air Filter is in place, how you came to believe the MAF sensor needed to be replaced, as they rarely go bad. Also is the replacement MAF sensor a used / salvaged, reman, or new part & is it the one Specified by Ford for your engine????
Some beginning thoughts for consideration. The answers you provide we hope can better help the forum understand your problem & help us help you!!!








