Let's walk through a quick example of a water powered car.
Let's say you start with 100 Newtons of energy in the battery.
You use that energy to perform electrolysis on water. Let's be wildly optimistic and say you only lose 10% of the energy to heat, noise and friction. That leaves you with 90 Newtons of energy in the form of Hydrogen.
You then use the Hydrogen to power an internal combustion engine. There's isn't some magical way to burn hydrogen that's "better" than internal combustion, even though some water powered car proponents seem to forget this. Again, we'll make wildly optimistic assumptions and assume you only lose 10% of the energy in both powering the car AND recharging the battery. This leaves you with 81 Newtons of Energy in the battery.
On the next cycle, you only have 81 of the original 100 Newtons to work with. This means you'll be able to produce less hydrogen.
Keep in mind, energy is used by moving the car. Even if you found some magical zero loss way to convert the electricity into hydrogen and then combust the hydrogen, you still lose energy in the process of moving the car. That 100 Newtons of energy will get whittled down and on each cycle you'll have less and less energy with which to perform electrolysis and thus less hydrogen to burn.
Water powered car proponents skirt over this simple bit of science and pretend they can magically get more energy out of burning the hydrogen than it took to separate the water in the first place. Doing so would violate one of the most fundamental laws of physics. Anyone who found a way to do this, who managed to unseat a basic principal of the cosmos like the laws of Thermodynamics would sweep away Newton and Einstein as irrelevant footnotes.
Realistically, if you have a charged battery, it makes more sense to drive the engine directly. This allows you to use all the energy that would be lost during electrolysis and combustion.
But don't take my word for it. Popular Mechanics got their hands dirty testing some of these magical perpetual motion engines.
"The Truth About Water-Powered Cars: Mechanic's Diary"
"Water-Powered Cars: Hydrogen Electrolyzer Mod Can't Up MPGs"
"Why Water Won't Improve Your MPG: A PM and Dateline NBC Investigation"
You can also check out "The great "run your car on water" scam" for more detailed information on the con artists selling conversion kits.
Scam artists are using claims of a "Big oil conspiracy" to get people to buy plans for electrolysis devices that don't improve gas mileage. The simple fact is if these devices worked, auto manufacturers would be building them into cars as improved fuel economy is a MAJOR selling point in most markets.