Is it possible that water (H2O) was made on earth?
This is more Astronomy than Earth Science, but the Young Earth, while forming, would have had a hard time retaining Hydrogen.   There's two reasons for this.   One is the Frost Line which means there was relatively little hydrogen and relatively little water and other gases present when the Earth formed.

And the other is Atmospheric Escape.  The Earth doesn't have enough gravity to retain Hydrogen.  In fact, the Earth is still losing Hydrogen, by this estimate, about 95,000 tons per year.



Precisely how much hydrogen and water the Earth contained at formation vs how much it acquired by solar wind (Hydrogen nuclei) and comet and asteroid impacts (water and other gases) isn't known.  I think it's likely that the majority came from impacts and I think that's where the consensus leans, but an precise answer isn't known.  

As far as the Earth combining Hydrogen with Oxygen, there's relatively little free Oxygen in the solar-system.  Oxygen binds easily with many elements, so it's abundant but not in it's elemental/gaseous state.  The Earth also tends to lose gaseous hydrogen and not having Oxygen until about 2 billion years ago, it's unlikely that much water was formed in that way.

When we learn more about exoplanets, we might find that larger/super Earths might retain more hydrogen and form abundant water in that way if they have photosynthesis to create Oxygen, but that's just theoretical.  Earth is too small to have retained enough hydrogen to do that in large amounts.