Welcome to TRS
Your 2007 Ranger has PATS(passive anti-theft system), not an alarm, its "passive", Ford also calls it SecuriLock
On the dash/cluster, there is a THEFT light, looks like a Padlock with a car behind it
When you put in the key and turn it ON the theft light should come on and then go OFF after 3 seconds
If the theft light starts to flash after that it means PATS couldn't read the Key you are using
This disables starter motor, and also fuel pump and fuel injectors, so there is no "work around"
If this happens then leave key ON and wait, in 45-60 seconds then theft light should start to flash a two digit code
A 1 followed by 1 to 6 more flashes, then a longer pause and it repeats the two digit code
That code will tell you what PATS "thinks" is wrong
11 Transceiver [transponder coil] not connected, or there is no power to it.
12 Transceiver internal fault.
13 No Key/no PATS key has been used to turn the ignition switch.
14 Incomplete key code received.
15 Invalid key code received.
16 CAN communications error.
Code 11 and 12 are most common, the transceiver is the antenna around the key slot that reads the PATS Key number
Not hard to replace these and no re-programming required
Another common issue with PATS is the battery voltage in the vehicle
12.3v to 12.8volts is acceptable
So get a volt meter, open the hood and test battery voltage
If its 12.2v or lower then that's most likely the problem
New battery is 12.8volts can be as high at 13v
3 year old battery is 12.5v
5/6 year old battery 12.3v and time to shop for battery sales
Car batteries last 5 to 6 years, sometimes 7 years
Your 2007 is 14 years old so should be on its 3rd battery, but could be "end of life" on 2nd battery
And could be just dirty battery cables, clean them
When starter motor is activated battery voltage will drop at least 2 volts, sometimes 2.5volts, this can cause PATS to reboot and check key again, but because of the low voltage it can't "read" the key so it triggers the anti-Theft system