Hydrogen isn’t a fuel. Almost all of the hydrogen on Earth is already “burned”. In order to use hydrogen as a fuel you first have to break the chemical bonds, which takes energy. You get back some of that energy when you then use the hydrogen as a fuel, but of course there is also waste heat (you just can’t beat the laws of thermodynamics).
Fossil fuels are a fuel. Sunlight, dead plants and animals, etc. have already put the energy into the fuel. You need to extract it from where it’s at and refine it, but unlike hydrogen, the energy is already there.
Assuming we don’t want to use the current steam and fossil fuel method of generating hydrogen, you could use large scale electrolysis of water, powered by a nuke plant. But then you have the nuclear waste issue (which doesn’t have a good solution). There is also the issue that if you are going to use electricity as the ultimate power source for your vehicle, you have less waste if you just use the electricity to charge up batteries and use an electric vehicle instead of using hydrogen as the energy transport mechanism.
You can also generate hydrogen using a photocatalyst, which is a fancy way of generating hydrogen using a process kinda sorta similar to photosynthesis. Currently this is still in the research phase as current catalysts degrade quickly, which makes current large scale production too expensive and resource-consuming to be practical.
In short, there’s nothing intrinsically good about hydrogen.
Electric vehicles don’t solve our energy problem. All they do is shuffle the problem around. The majority of our electricity comes from fossil fuels. If you need a lot of electricity, realistically your only choices are fossil fuels and nuke plants. Fossil fuels destroy the atmosphere. Nuclear plants have accidents like Chernobyl and Fukashima and even plants that don’t create huge environmental problems still have the issue of nuclear waste, for which no one has yet come up with a good solution. Renewables don’t produce enough power.
In the U.S., the power grids in the northeast and southwest are both very heavily loaded. You aren’t going to add more power load for electric vehicles in either part of the country without doing some major infrastructure improvements, which is going to cost some big bucks. Oh, and by the way, who wants a nuke plant in their back yard? Because otherwise you are talking about wrecking the already damaged atmosphere with more fossil fuels, and the whole point of switching to electric vehicles is to get away from fossil fuels.
It’s not an easy problem to solve.