When talking about hydrogen vehicles, it is about vehicles with an electric motor. The electric motor is powered by a Fuel Cell. A Fuel Cell is a device where gaseous hydrogen and oxygen enter and electricity and (a tiny bit) water comes out.
Hydrogen is made by splitting water with electricity. If this split happens with so-called “residual energy” from wind turbines or solar collectors, you speak of green hydrogen.
Hydrogen can also be made by so-called steam reforming, then natural gas is heated with very hot water vapor.