Here's why:
* Dwarf stars are smaller and have a higher mass packed into a smaller volume. This means the matter is compressed much more tightly.
* Giant stars are much larger and have a lower density. They have expanded greatly, spreading their mass out over a vast volume.
Here's an analogy: Imagine you have a cup of sand. If you squeeze it into a tiny ball, it will be much denser than if you spread the sand out over a large area.
Examples:
* Our Sun is a dwarf star. It's about 1.4 million kilometers in diameter.
* Betelgeuse is a giant star, about 1,000 times larger than our Sun. It has about the same mass as our Sun, but spread out over a much larger volume.
So, while giant stars are huge, they are less dense than dwarf stars.