Fifteen years ago hydrogen fuel cells looked like the likely successor to petrol. Fast refuelling, long range, water as the only emission. Several manufacturers committed heavily.
Batteries won the passenger car market decisively, and the reasons are instructive.
The efficiency problem
Producing hydrogen from electricity, compressing it, transporting it, and converting it back to electricity in a fuel cell loses most of the original energy. A battery vehicle uses roughly two to three times less energy for the same distance.
When electricity is the input to both, that ratio determines running cost, and it is not close.
The infrastructure problem
Electricity is everywhere. Hydrogen refuelling requires purpose-built stations with high-pressure equipment, of which there are very few, and each costs far more than a bank of chargers.
Nobody buys a car they cannot refuel, and nobody builds stations for cars that do not exist. Batteries escaped that loop because a plug socket already existed in every building.
Where hydrogen still makes sense
Heavy long-distance trucking, where battery weight eats into payload and charging time is expensive. Shipping. Some rail. Industrial processes that need hydrogen as a chemical input regardless.
These share a property: the alternative is genuinely worse, rather than merely different.
The colour question
Most hydrogen produced today comes from natural gas, releasing carbon dioxide. Hydrogen made by electrolysis from renewable electricity is clean and considerably more expensive.
A hydrogen vehicle running on the former is not an environmental improvement, which is a detail that gets omitted regularly.
The current position
Effectively over for passenger cars. Alive and reasonably promising for heavy transport, which was never the market that got the attention.