My car started it fine this morn drove it 3 miles switched off when restarted it spulltered like as if no petrol in it and cut out did this aprox 10 times then just took off I drove home started it and turned it off aprox 6 times to check and wworked fine I continued about 5miles turned off car for 1 hour started no prob again drove another 3 miles turned off car restarted fine drove down the town popped into shop for 5 mins went to restart the car dead as a magot? I did discover the car carpet a bit damp a month ago?
1. There could be some issue with the electricals / ground points. Issue could be with fuse box / fuses. Press it all once again to eliminate loose connection.
2. Check the battery voltage. If the voltage is too low, try recharging it or replace it based on its condition.
3. How long is your vehicle? If it is too old, better check and clean EGR valves, Fuel puml, Air filter, Air intake manifold etc.
Since you did not mention about any warning lamps and also the issue is not happening everytime, we can rule out the glow plugs, starter motor problems.