Anyone who has followed hydrogen as a fuel for a while sees pretty easily that its a solution in search of a problem. It really doesn't make sense to use renewables to make hydrogen fuel to then burn: batteries are better for storage of energy in most cases (I will grant that there are edge cases where a liquid/gas fuel is a better technical solution than batteries, but I think that options like ethanol are probably…
Hydrogen for cars is dead. However long haul flights, fertilizer, green steel, etc. very difficult to find a carbon free alternative that isn’t hydrogen.
The basic mistake you're making here is thinking that "carbon free" is key. It is not, what matters is that a given energy source is carbon NEUTRAL. Anthropogenic global warming is driven primarily by net increase in atmospheric CO2 on our timescale. When CO2 in consumed from the atmosphere, and then shortly released again (textbook example being a plant fixing CO2/H2O into sugar and the getting eaten by an animal and the animal the metabolizing sugar back to CO2/H2O) the short term net change is zero. The problem has come from releasing stored carbon that was fixed in geologically long term ways, ie, fossil fuels.
We're used to thinking of "hydrocarbons" as equivalent to "fossil fuels" but that's not true. It's perfectly possible to directly synthesize any hydrocarbon from atmospheric CO2, water, and zero carbon energy like solar. Burning those hydrocarbons later will result in net zero change to atmospheric CO2, and thus are perfectly acceptable from an AGW POV (at ground level in particular burning fuels have other pollution issues that may be worth getting away from, but not global warming). The issue is "just" cost, it's much more inefficient and thus costlier to go solar -> fuel synthesis -> combustion -> useful work vs solar -> transmission -> battery -> work. But for applications where battery energy density is insufficient or other properties are required (like high performance aircraft that use fuel as coolant as well as energy) that could be worth it.
So green hydrogen directly faces not just batteries, but green methane, gasoline and other hydrocarbons. Which are far, far easier to work with and have many better properties than hydrogen itself. And on top of course feed seamlessly into existing infrastructure and system.