Hydrogen fuel cell vehicles are electric cars. They use a small battery - or capacitors in this case, and a fuel cell and hydrogen to generate electricity on the fly.
This will
always be lower efficiency than a EV with a bigger battery. Currently, the FCEV is ~1/2 the efficiency of a BEV.
Then there is the energy to get the hydrogen, and energy to get the hydrogen into the car. Take a look at this:
If the hydrogen is made from natural gas, it is even less efficient.