my 02 C240 Mercedes will not stay on i think its my fuel pump or fuel injection? on 2002 Mercedes-Benz C240

when the car is on and in drive it will attempt to drive then cut off I believe there is something wrong with the fuel injection or fuel pump I'm not sure but looking for answers.