I hope I don't demoralize you, that is not my intent. There are about a Kazillion problems that fit your symptoms. We could all "guess away", but those skills are better spent on the lottery.
If I had to guess .... no, I refuse to guess, without a bit more info: It seems you have an electrical shutdown .... Does anything else other than the engine shut down? For example, do the headlights turn off, if driving at night? ... do the instrument panel lights come on, as though at start-up? Do you have a voltmeter?