Gas giants are planets that are composed mostly of hydrogen and helium. They are much larger than terrestrial planets, and they have a much stronger gravitational pull. This allows them to hold on to more moons. In fact, some gas giants have hundreds of moons. Jupiter, for example, has 79 known moons. Saturn has 62 known moons. Uranus has 27 known moons. And Neptune has 14 known moons.
Terrestrial planets, on the other hand, are planets that are composed mostly of rock and metal. They are much smaller than gas giants, and they have a much weaker gravitational pull. This means that they can only hold on to a few moons. Earth, for example, only has one moon. Venus and Mercury have no moons. And Mars has two moons.