A quick guess is the lift pump is not working.
.
On many machines gravity will deliver fuel to the injection pump when operating on flat level ground and with a tank that is mostly full.
For other times, low fuel level, driving up a slope the fuel system uses a small pump to lift the fuel up (just a phrase) to feed the injection pump. When that pump stops working your symptoms appear.
Your pump is mechanically driven off the side of the engine. This raises a further caution because if its pumping diaphragm fails diesel fuel can end up mixed with the engine oil so check oil level for being too high.
Open the section of line shown a #120 above and crank the engine. If the pump is good fuel should spurt out.
Dave