Oversimplifying, but you can explain that as "Because water is... the "ash" you get after burning hydrogen and oxygen."
Water is kind of like ash. Technically full combustion of any hydrocarbon outputs CO2 and Water. Since water isn’t a greenhouse gas it’s not mentioned when discussing combustion usually.
This is one of the reasons why methane leaks are so impactful - not only is methane a terrible green house gas, when it decays in the upper atmosphere, it decays into water vapour and CO2)
https://science.nasa.gov/earth/climate-change/steamy-relatio...