We know that a planet is formed from the nebula of gas and dust. Gravity pulls the particles together in a core. So we all know that the gas cloud is a cloud of hydrogen.
But how did water form? From where did oxygen come? How did it combine to make $\ce{H2O}$$\text{H}_2\text{O}$?