This is a lie pushed by oil companies. First it is incorrect because hydrogen is not a natural energy source, it is a way to store energy. But above all, currently the vast majority of hydrogen is made by steam cracking methane or other hydrocarbons, which is a process that releases CO2. You can think of hydrogen production + hydrogen use as a combustion with additional steps. And since the hydrogen supply chain is very inefficient (hydrogen is very light so you need to compress it a lot to store it, it is a very small molecule so it leaks very easily, and when you use it you need to decompress it so you get more losses due to thermodynamic effects) it turns out as quite bad from the point of view of CO2 emissions. It is just a way to sell more oil.