On any car if you get a check engine light or other fault light this typically means one or more of the sensors has failed or has a faulty connection.
as its been sat for a while whats likely is its a connection thats corroded up
The fault can be something quite simple and nothing that’s going to stop the car to something quite major that will reduce engine power and possibly stop the engine
The ECU senses this and may put the car into 'limp home' mode which typically limits the revs and the amount of power available. Usually the car is safe to drive for a short distance as the mode is intended is intended to get you home without incurring any engine damage
The quickest route to repair is to have the car plugged into a diagnostic machine which will read off the fault code stored in the ECU (providing the light is still on at this point) and indicate which sensor has failed or whether the fault is more serious.
I'd run it for a short while to warm everything up and see if it goes away
if it doesn't switch it off and use some switch / contact cleaner on the sensor pins, disconnect 1 at time and spray both halves
do not use wD40 for this