Here's why:
* Nuclear Fusion: Stars generate energy through nuclear fusion, where lighter elements fuse together to form heavier ones.
* Stellar Evolution: Massive stars have much stronger gravity and higher core temperatures than smaller stars. This allows them to undergo a series of fusion processes that smaller stars can't.
* Iron Barrier: Iron (Fe) is a very stable element. Fusion reactions involving iron actually *absorb* energy rather than release it. This marks a significant stopping point in the fusion processes within a star.
* Supernova: When a massive star runs out of fuel, it can no longer support its own weight and collapses in on itself, causing a supernova explosion. The immense heat and pressure during this explosion fuse elements heavier than iron.
Therefore, massive stars are the primary factories for elements from helium to iron, with the heavier elements beyond iron being produced during supernova events.