Are planets with oceans common in the galaxy? It's likely, NASA scientists find
I'd assume so since water, or just hydrogen and oxygen, are pretty common in our solar system alone. We have a lot of water worlds here, entire oceans on other bodies like enceladus, europa ganymede, etc. And I don't know too much about the formation of galaxies but I highly doubt that those elements would be present in just our little corner ot the universe. Expeicially since hydrogen alone is literally everywhere.
The first demonstration that water isn't an element was igniting hydrogen and forming water, to show it's made of hydrogen and oxygen and the volumes can be used to determined the chemical makeup.
Early planet formations being extremely hot can be enough to form water and pretty likely form it all over the universe when stars die. Our sun isn't a first generation star so we know heavier elements like metals and oxygen are all over our solar system so water existing before the earth is likely too.