However, Mercury and the Moon have extremely thin atmospheres, often referred to as exospheres, which are so thin that they are practically nonexistent. These exospheres are composed of trace elements like sodium, potassium, and helium, and they are constantly being replenished by solar wind, micrometeoroids, and other processes.
So, while it's not entirely accurate to say they have "no atmosphere," they are incredibly thin and effectively lack a substantial atmosphere like Earth or Mars.