Hydrogen fuel is a scam being perpetrated by fossil fuel companies. Almost all commercial hydrogen is made through a process called methane steam reforming. It involves cracking methane (CH₄) with high-temperature steam (H₂O) and collecting the H's that fall out. Unfortunately, the leftover C and O likes to get together and make CO and CO₂, which is vented straight into the atmosphere because it's cheaper than capturing them. This is what's called "grey hydrogen". "Blue hydrogen" is the exact same process but with modest attempts made to capture some of the carbon. Most of the carbon still gets vented though. Behind every hydrogen-fuel concept is a natural-gas extraction company looking to keep a strangehold on energy policy.
Anyone who tells you that commercial hydrogen is made mostly from electrolysis (electricity plus catalyst plus water = hydrogen and oxygen, aka "green hydrogen") is either lying through their teeth, or has had the wool pulled over their eyes. A tiny fraction of commercial hydrogen is made that way because it's not cost-effective. And even then mostly as greenwashing PR stunts.