The moon’s escape velocity is much less than the root mean square (RMS) velocity of gas molecules on the moon.
Therefore, the molecules of gas escape from the moon’s surface.
The gravitational field is weak on the surface of the moon. Hence, the moon doesn’t have an atmosphere.
Escape velocity can be given as V escape = √2gr.
For earth, it is about 11200 m/s. But for moon, it is less. i.e. 2400 m/s approximately.
The temperature of moon’s surface is between -155°C and 100°C. The speed of molecules becomes more than the escape velocity as the temperature increases.
Therefore, RMS velocity of all the gas molecules is more than the escape velocity of the moon’s surface.