when vapor cools and changes to water
Condensation is what you are thinking of.
Condensation is the answer