I thought the ship had been designed to be able to use water only as input to its fuel generation.
The only fuel you can make from water is hydrogen. The RS-25 engines used on the SLS core stage and the Space Shuttle used liquid hydrogen, as did the J-2 engines on the second and third stage of the Saturn V (but not the first stage, which used RP-1 (kerosene) burning F-1 engine)
Starship’s Raptor engines use liquid methane however. There are a bunch of tradeoffs between the different fuels, but generally liquid hydrogen is more difficult and expensive to deal with. With low cost reusability being one of the primary objectives of Starship, liquid methane was chosen as the best option. The fact that it can also be manufactured on Mars was also considered, since CO2 is abundant in Martian atmosphere.