Gas and dust can condense into clouds, like the Taurus Molecular Cloud, where collisions between hydrogen and oxygen can form water.
ESO/APEX (MPIfR/ESO/OSO)/A. Hacar et al./Digitized Sky Survey 2, CC BY