Check for spark & fuel when it's dead and go from there.
Change the fuel filter first,
If a 1998 Oldsmobile 88 is shutting down after being driven for a while, the vehicle may have a problem with the computer. Something is telling the computer that the vehicle needs to be shut off. A new computer might fix this problem.
car starts but shut off while driving
Ford f350 super duty shut off and lose power while driving
It is the fuel filter, get it replaced asap.
Check the M.A.F. ( master air flow ) on the intake. This could be a factor.
The transmission computer has detected a malfunction. You need to have it checked for codes.
out of fuel, bad alternator/battery, mechanical frailer. need more info., does it crank? fuel level? any lights on dash board when car shut off?
Out of gas
If you lost power while driving it could be the alternator. Its not charging your batter anymore
Probably the alternator.
Possible a bad or corroded ground cable .