The goal is to eventually produce hydrogen from water, through electrolysis. We have tech for this, but it's very expensive compared to our methane methods. Current electrolyzers are used for industrial applications. Spain is currently planning a huge deployment of electrolyzers to make ammonia, mostly for fertilizer.
And honestly, electrolyzed hydrogen will mostly be used in industry, and maybe some long-haul transport, but almost certainly will never make sense for cars. We will probably see hydrogen converted to methanol or ammonia or something else that's easier to handle than hydrogen. Though I do hear that hydrogen could be used with current ocean freighters with only a 10% loss of capacity, so there's some potential there.