If all you have is a code 24 then it is not the source of your problem, as it should be close enough to run okay with the default value for air temp.
The concern would be that the AFM signal is also bad since they share the same sensor body and wiring. If code 34 is set (bad AFM) the car will run in limp mode up to 3000 rpm. Some AFM failures aren't severe enough to set code 34, and the ECU uses the bad AFM signal thinking its good and runs badly or not at all. Best course of action is to verify correct operation of the AFM with a frequency counter on the KV signal. The AFM And CPS signals are primary, the ECU needs those to run, unlike temp sensors and TPS which are secondary.