Do you have any fault lights on ? as 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.
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.
Also when was the car last serviced ?