Welcome to the forum.
There's a good chance your fuel system is leaking air. Normally on a diesel the sucked from the tank up to the filter and down to the fuel pump then pressurised and excess is returned to the tank via the fuel cooler. If the fuel hose is loose or damaged, if the primer bulb is cracked or damaged, or if the water alarm is not completely in place, air will enter the hose slowly overnight and allow the fuel to drain back to the tank. This means the car will start on the fuel it has in the filter, but once that's consumed it stalls.
It's easy to test. In the morning before trying to start the car, find the primer bulb (right next to the filter) and squeeze it. It should be dry. Keep your eye on the hoses and filter while you do this. Continue squeezing, count the squeezes. The bulb should go firm before your 6th squeeze. If you go further than that, chances are you've got an air leak. Keep squeezing, because once you pressurise that side of the fuel system, diesel will start to come out of the leak and you'll be able to fix it.
The water alarm sits in the bottom of the fuel filter and its electrical connection should line up with the black knob on the front. If it's not, just turn it until it is.