The most widely used method of producing hydrogen is with methane, a fossil fuel. It's not perfect because it generates a lot of carbon dioxide.
This dude wrote a book and in it said that producing hydrogen using methane actually makes more carbon dioxide than just burning the natural gas directly.
Even if it didn't, it would make more sense to just burn the natural gas instead of breaking it down to make hydrogen. That's just an extra step you don't really need.
There are other methods of making hydrogen by using fossil fuels, including by burning coal. But that's stupid, because coal makes pretty good electricity which is already used to power pretty much everything and has a pretty awesome infrastructure to support it. So how about you just use the coal to make electricity because we already do that on a grand scale.
You could also make hydrogen via electrolysis, but that's also a stupid idea which is why it's rarely used. Producing any useable amount of hydrogen via electrolysis requires
immense amounts of electricity, which of course is usually created using the aforementioned coal. Seems like we should just use the electricity then, right? On top of that, the most efficient forms of electrolysis are still vastly
less efficient than using natural gas, which of course we can already use as a fuel, etc, etc...
As you can see, hydrogen makes very little sense as a mass-market fuel source. It's rare naturally, which means we have to make it, and we make it by using fuels which are already useful and commonly used in themselves. Clearly, it makes more sense to just keep using them instead of making things even more complicated.