Hydrogen fuel cells in mass produced vehicles do not have a future since hydrogen does not actually like to react - you need a catalyst. And the best ones we have are based on platinum, which is very rare a expensive. If we produced any decent quantities of "hydrogen" cars, we would have such a shortage of platinum we would not be able to complete them. Of course there are claim this has been solved but to the best of my knowledge no such catalyst actually ships in commercial quantities. [0]
The second reason is that hydrogen is 1/10th the density of diesel even when liquid (which is as dense as it gets). Maintaining hydrogen in its liquid form is energy intensive. Hydrogen tends to leak through the smallest cracks and also because the atoms are so small tends to leak even through solid metal. To sustain the high pressures and degradation by hydrogen you need a very expensive tanks. You also need to handle the case, when the car crashes/ catches fire releasing all of the hydrogen somewhat safely. This tends to be a 6 MW flame upward of the car. Too bad if it crashed under a bridge or garage. This is much worse than a burning ICE/ BEV car.
Hydrogen gas stations have all of the problems with the tanks as well. That makes them very expensive. Battery charging stations are somewhat easier - everywhere you have higher voltage you can build a decent charging station. Big parking lots can have solar roofs fulfilling a part of the charging demand and keeping the cars colder in the summer.
At the same time you don't have any of the advantages of batteries - such as that you can charge them almost everywhere or when breaking. Hydrogen cars would need to be hybrids basically to improve on these, in this regard they are more similar to classical ICE cars.
Finally, making hydrogen ecologically and economically is not that easy in big quantities. In the end, you realize it is means to a longer operation of the infrastructure of classical fossil fuel companies. Unrelated to cars, you can put some hydrogen (up to about 8% it seems) into natural gas without noticeable change in properties when used for heating. But you can probably slap a green or at least "blue" stamp on the solution. In the end, all of this is just as damaging as the production/ burning of bio diesel/ gasoline spiked with ethanol. Putting hydrogen into cars would just make support this fossil fuel agenda without actually helping the environment much and quite possibly enable decades of even more damage to the environment and public health with profits mostly for just a few already filthy rich people.
[0] https://www.quora.com/Can-I-create-a-Hydrogen-fuel-cell-with...