Ignoring some of the other issues:
Imagine we have this electrolysis plant, splitting up water to produce the hydrogen we need for an area. That's fine.
But it needs fed electricity to keep the process going. Lots of it. It needs more electrical power to split the water than combining it again produces.
So it starts off being energy-negative, and it takes serious electricity to make it happen. Our grid isn't necessarily ready for that.
And then we need to transport the hydrogen. Probably with things like trucks and trains at first (but maybe pipelines eventually). This makes it even more energy-negative, and adds having great volumes of this potentially-explosive gas in our immediate vicinity some of the time whether we're using it individually or not.
Or: We can just plug in our battery-cars at home, and skip all that fuel transportation business altogether.
It's still energy-negative, and the grid might not be ready for everyone to do that either.
But at least we don't need to to implement an entirely new kind of scale for hydrogen production and distribution before it can be used.
So that's kind of the way we've been going: We plug out cars into the existing grid and charge them using the same electricity that could instead have been used to produce hydrogen.
(It'd be nice if battery recycling were more common, but it turns out that they have far longer useful lives than anyone reasonably anticipated and it just isn't a huge problem...yet. And that's not a huge concern, really: We already have a profitable and profoundly vast automotive recycling industry. We'll be sourcing lithium from automotive salvage yards as soon as it is profitable to do so.)
It’s not even the grid, by the time you’ve done the electrolysis you’d be better off just charging a battery.
Also, compressing and cooling a gas takes another huge hit at the efficiency. Electrolysis comes out at atmospheric pressures.
Oh and the platinum electrodes you need…
I’m also just now visualising a hydrogen pipeline fire… terrible terrible idea.