Welcome to the forum
2003 Ranger will have PATS(passive anti-theft system)
There will be a THEFT light on the dash, looks like a padlock some years, other years it Spells THEFT
PATS will disable starter motor if Key in the ignition doesn't "pass the test"
When you turn the key on look for the Theft Light to come ON and then go off, if you don't see it come ON the Bulb may be burned out
If the Theft light starts to flash then PATS has disabled the starter, wait, with key on for 45-60 seconds, and theft light will start to flash a 2 digit code, 1 flash and then 1 to 6 more flashes and it will repeat a few times
so 11 to 16 are the code numbers
That will tell you WHY the key didn't "pass the test"
If bulb is burned out then you will have no way to tell if its a PATS issue
You can listen for the fuel pump in the gas tank, it should run for 2 seconds each time key is turned on, its not quiet, you will hear a HUMMMMM from behind the cab if its working
If you don't see a THEFT light key on(no bulb) and don't hear the fuel pump then its a PATS issue
Its possible the ignition switch is not being pulled into the full START position by the key turning, easy to check for that
Fuse 24 in the cab fuse box will get 12volts when ignition switch is in the START position, 0 volts when its not
You can pull out that fuse and put a test light or volt meter on fuse slot and do repeated turns of the key to see if 12volts is intermittent
In a 2003 that 12volts leaves fuse 24 and goes out of the cab to the DTR switch on transmission, on a pink wire
DTR(Digital Transmission Range) switch must be in PARK or NEUTRAL position to pass that 12volts to Starter Relay in the engine fuse box on a tan/red wire
The column shifters on the Ford trucks often got loose, this would cause the DTR switch to not show FULL PARK every time, so intermittent no crank
Try shifting to Neutral and see if it now cranks
Ignition switch------------fuse 24---------(pink wire)-------------------DTR------(tan/red wire)---------------starter relay
PATS disables the starter relay in engine bay fuse box
If you hear this relay "CLICK" when key is turned to START but no crank, then starter motor is the problem