Yes, water vapour interferes even stronger with astronomical observations than $\rm CO_2$.
In the optical, water easily forms droplets which scatter light. But also in the gaseous phase water has strong absorption bands, some of those reach into the optical, while most of those however lie in the infrared, making water a greenhouse gas at the same time.
Let's have a look at the absorption spectrum of various gaseous species in the atmosphere:
Here we see with data what would otherwise take too many words to explain. Take note that the observable spectrum for humans is at the wavelengths $\rm \lambda = 0.4-0.8 \mu m$. The many absorbtion bands of water make clear why this interferes with astronomical observations:
In the same way that outgoing thermal radiation from Earth is stopped at going into space, also infrared coming from space is absorbed in the atmosphere and thus not reaching telescopes.
To deal with this there is a number of ways to cope:
- Go high up above all the water vapour, to a dry place like Chile. Or a dry place like space. Then the absorption spectrum looks much more benevolent, and that's part of the reason we have all the major observatories in Chile, Mauna Kea, etc.
- Try to observe in one of the absorption bands, but fly above all the water vapour. This is what the two airborne-based observatories SOFIA and its predecessor do/did.
- Observe through the infrared-'windows' that let light pass through, from the ground. This is a bit exotic science wise nowadays - AFAIK this is a method mostly used in history, as today it is hard to justify building a massive telescope when most of your prospective signal gets absorbed. This was employed at Mt. Wilson Observatory, but also many others.