Here's why:
* Stars form when a massive cloud of gas and dust (called a nebula) collapses under its own gravity. This collapse creates immense pressure and heat in the core, eventually triggering nuclear fusion.
* Planets form from the leftover material after a star is born, but they don't undergo nuclear fusion.
* Galaxies are massive collections of stars, gas, dust, and dark matter. While gravity plays a role in their formation, the individual stars within them are what undergo nuclear fusion.
* Solar systems are collections of planets, moons, asteroids, and comets orbiting a star. While gravity is essential for their formation and stability, it's the star that is undergoing nuclear fusion.