I have a 2002 Mazda B3000 (essentially a Ford Ranger) that almost never starts on the first attempt. Usually it takes 2 or 3 tries before the car finally turns over. Each time I hold in the crank I hear the starter engage and the engine whir but the car doesn't start.
I've tried cycling the key to iginition on, waiting for a 10 seconds, then back to off several times to try and prime things but that does not seem to help.
I ran Seafoam through the gas lines to try and clear up any carbon deposits but this also has done nothing.
I have taken it to a mechanic twice, both times they were unable to reproduce the problem which blew my mind since it happens about 95% of the time I try to start the vehicle. They tested the fuel pressure and told me it was normal. This may be anecdotal, but I notice that if I stop the car and then start it again pretty soon (within 10-15 min) after it has a good chance of starting right away on the first try.
Edit:
I cleaned my mass air flow sensor to no avail. As an added detail, when the car does start it usually begins right away or revs really low and then gets up to idle in a second or two. Sometimes it will rev low and shut off.
Edit 2:
You can see my response to my own question below. It was discovered that both the mass airflow sensor and the throttle sensor were faulty and needed to be replaced.