Starts up but will cut off while driving, new battery; what is wrong? on 1994 Volvo 940

The vehicle starts right up but will cut off while driving it will start to shake and then cuts off. Turn the key and the engine starts again drive for a while and the car cuts off no lights come on telling me there is a problem

Asked by for the 1994 Volvo 940
Several things could cause this. I'd check the fuel pump relay first it's located behind the fuses. Also check the crank position sensor or reference sensor as Volvo calls it. That is behind the cylinder head, at the bell housing. You can start the car, let it idle and wiggle the cable from the crank sensor and see if it cuts off. It's a shielded cable and the insulation could brakes on it over time.
If the problem happens only when the fuel level down to about 1/4 the connecting hose at the pre-pump in the fuel tank could be broken and won't supply fuel to the main pump, however the car would keep cutting off shortly after it started.

thank you is this costly to repair?
The relay is fairly cheap, the sensor is a bit costly, but you can change those yourself and save the labor. I suggest to buy original Volvo parts, there are many lower priced aftermarket junk available through different part chains.