It looks like interaction between a planet's primary atmosphere and magma on the surface early in its formation could lead to the generation of a significant amount of water.
This would mean that a planet might not need to accrete water purely from the protoplanetary disk in order to be habitable.
We are starting to build better models of planet formation thanks to research like this!
https://phys.org/news/2025-10-large-quantities-natural-consequence-planet.html
