Car cutting off when driving

when I am driving my car no matter how far or how fast I am going it cuts off, and it takes me up to 5 minutes to restart it again. and I can go a few blocks and it cuts off again, and continues to do that until I get to my destination. I have used fuel injection cleaner, changed the fuel line filter, and checked my battery connections.Any answers for that?

Carry an extra spark plug in the vehicle. The next time the engine stalls, remove a plug wire from one of spark plugs and insert the extra plug into the end of the wire and lay the spark plug on the engine. Try starting the engine. If there is no spark at the spark plug, it could be that the igniter in the distributor is failing when exposed to heat.

Tester

If there is good spark, then you may have a fuel delivery problem, such as a clog in the gas cap vent, or a problem with a failing fuel pump, or a vapor recovery system issue.