Currently, the hydrogen available as fuel is being cracked off natural gas. It costs more energy to "create" this "green" fuel than what it delivers. Same is true for separation from water. This will not be economically viable.
The electrics only displace the combustion process to generate the power. It is also extremely inefficient as a means of power. Batteries will always be heavy, require frequent charging and have limited range. These things alone will keep electrics as a novelty or short range vehicle.
Pound for pound, liquid fuel will remain the most efficient and economically viable fuel from many many years.
Right now, the closest viable alternative is CNG or LPG for clean and economic fuel. But again, this requires a significant amount of energy to harvest, compress or liquefy.
Want to learn about how latest craze in batteries. Look up the processes and the energy required to make a "green" Li-ion battery. Here again, the true costs are hidden.