You were driving and your car tried to die like you were running out of gas you pulled over and went to start it again and it would turn over but not start just keeps cranking?

Was there gas in the gas tank? How old is your car? Sometimes your fuel filter gets clogged up. Sometimes your carburetor gets clogged up. Sometimes your fuel injectors get clogged up. With alcohol in the gasoline, you seldom have water in your gas tank because the alcohol mixes it with the gasoline so it no longer causes a problem. Is the gas cap tight on your gas tank. If it is not tight, that can cause the problem you describe. If your gas tank can not hold pressure, your car can act like it is out of gas. It is easiest to check your gas cap. Then replace your filter. Then clean out your gas line. If it still does it, hook it up to a computer. You could have computer problems. Modern cars have a number of computers. Electronics go bad. People make good money fixing them. Do everything else first.