Hydrogen vehicles were hyped a few years ago and several companies like Honda, Toyota, and Hyundai also launched Hydrogen fuel cell-powered electric vehicles(FCEV). Japan is still pursuing a hydrogen future as a strategy and there are a few FCEVs lined up too (https://honkyroad.com/choices-in-the-hydrogen-car-market/). They basically use electric motors similar to an EV but electricity is generated in the fuel cell converting hydrogen into water vapor.
That's enough of chemistry, these vehicles have a driving range of 300-400miles on a single cylinder of hydrogen
FCEVs are significantly expensive when compared to EVs. The FCEVs using hydrogen fuel still need a battery that is big enough to store 50-60miles of energy which increases the cost of the vehicle.
An EV can be charged at home or if a station has to be made the electrical infrastructure is well developed in almost all the countries and there is no need to start from scratch.
If you look into the history all the technologies used in an EV such as a motor, battery, and charging were developed and improved over a century but only fewer improvements were done on the fuel cells.
Hydrogen production is complex. Hydrogen is produced from water by separating hydrogen from oxygen in an electrolyzer and the process is called electrolysis.
Electricity is passed through the water in a controlled environment to do this. This needs a complete infrastructure that needs to be set up. Hydrogen can be produced using another cheaper process called steam methane reformation. Hydrogen produced in this method is cheaper but the process includes CO2 emissions which means it’s not eco-friendly.
Once the hydrogen is produced it needs to be compressed for storage and this again needs a lot of energy. That's not it, even when you transport hydrogen it needs those pressure tanks to hold its pressure. Even the stations need to have these high-pressure tanks. These are all factors that increase the production cost. After going through all these processes the final fuel cost will be more expensive than gasoline or diesel.
● Electricity has to be passed through the water to separate hydrogen this process is about 70% efficient
● The hydrogen gas has to be then compressed to transport and this process is about 90% efficient.
● Once you fill up your car with hydrogen the fuel cell in your car converts hydrogen to electricity which is about 60% efficient.
● Then the electricity has to run the motor which is 95% efficiency.
If you supply 100w power at the beginning you end up using only 35W to drive your vehicle.
Hydrogen vehicles might have some bright side but in the real world, they are not applicable due to their high fuel cost and inefficiency. Whereas a battery electric vehicle is 95% efficient and greener.
To conclude it's not smart to use electricity to make hydrogen and then converting hydrogen into electricity when you can directly plug-in electricity into your vehicle. This is the main reason why EVs are the future and not FCEV.