Here's why:
* Density is mass per unit volume.
* The Sun is huge but mostly made of gas. This makes it less dense than smaller, rocky objects.
* Rocky planets like Earth and Mercury are much denser due to their composition of heavier elements.
The densest objects in the solar system are:
* The cores of gas giants like Jupiter and Saturn. These cores are likely made of compressed rock and ice, making them extremely dense.
* White dwarf stars. These are the remnants of stars that have exhausted their fuel and collapsed, resulting in incredibly high densities.
While the Sun's gravity is immense due to its mass, it's not the densest object in the solar system.