Did we have an alternative to fossil fuels in the the 20th century?
theconversation.com
theconversation.com
This article [*] implies he was making a thermal-electric effect device, and may have hit on efficiency from solar effects as well by accidentally making a junction device.
https://solar.lowtechmagazine.com/2021/10/how-to-build-a-low...
You can fill your tank with water and the hydrogen engine will separate hydrogen from oxygen and burn the hydrogen.
You don't fill your tank with water. You fill it with high-pressure hydrogen produced elsewhere.
What you describe is thermodynamically impossible. It takes energy to separate hydrogen from oxygen - more than you get from burning the hydrogen generates water.
The article you link to says "Most hydrogen today is derived from fossil fuels like natural gas", so hydrogen cars weren't really a 20th-century alternative to fossil fuels.
Yes, hydrogen can be made from non-fossil sources. So can diesel fuel.