On any car if you get a check engine light or other fault light this typically means one or moreof the sensors has failed or has afaulty connection.
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.
You can do a veryrough and ready check yourself by unplugging sensors one at a time and seeingif any of them change the driving condition which would indicate the most recently unplugged sensor is the faulty one. This method is not foolproof though and reading a fault code off is the better method.
from your description this sounds like alack of fuel and could be a lack of fuel pressure from the electrical pump atthe tank.
If the connectionsto the pump are corroded or damaged then the pump could stop at any time orcould not be running at full speed. Check that its relay switches in and outand the relay contacts are clean and bright – replace the relay if in any doubtand do the same for the fuse,
Ideally measure the pressure at the inlet to themain engine fuel distributor (should be 5 to 5.8bar) and if this is low checkthe pump as described and also consider changing the fuel filter as if thispartially blocked this too will reduce pressure.