They can... but a challenge with a small planet in the habitable zone of a star is that it also has a weaker magnetic field and is more prone to having its atmosphere stripped away.
> In October 2017, NASA scientists at the Marshall Space Flight Center and the Lunar and Planetary Institute in Houston announced their finding, based on studies of Moon magma samples retrieved by the Apollo missions, that the Moon had once possessed a relatively thick atmosphere for a period of 70 million years between 3 and 4 billion years ago. This atmosphere, sourced from gases ejected from lunar volcanic eruptions, was twice the thickness of that of present-day Mars.
While smaller planets are certainly more numerous - many of them likely lack the mass and active magnetic field to retain an atmosphere in the habitable zone.
Consider that the moon had an atmosphere - https://en.wikipedia.org/wiki/Atmosphere_of_the_Moon#Ancient...
> In October 2017, NASA scientists at the Marshall Space Flight Center and the Lunar and Planetary Institute in Houston announced their finding, based on studies of Moon magma samples retrieved by the Apollo missions, that the Moon had once possessed a relatively thick atmosphere for a period of 70 million years between 3 and 4 billion years ago. This atmosphere, sourced from gases ejected from lunar volcanic eruptions, was twice the thickness of that of present-day Mars.
http://time.com/4974580/nasa-moon-had-atmosphere-volcanoes/
Which brings us to
https://worldbuilding.stackexchange.com/questions/13583/what...
While smaller planets are certainly more numerous - many of them likely lack the mass and active magnetic field to retain an atmosphere in the habitable zone.