The previous generation of stars famously are the origin of all the heavier elements (up until iron?) in the solar system. So a big portion of the solar system mass actually is made up of Carbon, Silicon, Iron and the like because of that. But in the center, and only in the center, there is a star with presumably almost no heavy elements inside. How can that be? Am I wrong about the actual mass concentrations or is there really an imbalance, i.e. is the element distribution really lighter towards the center of the solar system? I would presume that the previous generation of stars just ended in a more or less uniform cloud of debris, from which the solar system formed. But if so, why aren’t there star systems where the star has a very different composition and is kind of a spluttering, dirty fusion machine (metaphorically, I mean)?
The solar system contains very little of elements heavier than Helium - less than 2% by mass.
This is reflected in the chemical abundances measured in the photosphere of the Sun. i.e. The Sun does contain heavier elements.
Your question is the wrong way around; it is not that the heavier elements have not sunk into the middle, it is that the vast majority of hydrogen and helium that was in the same place as the planets when they formed, did not end up as part of the planets. In fact, even this is only partially true. The mass of planetary material in the solar system is also dominated by the hydrogen and helium in the gas giants.
So the conundrum is only why the smaller planets don't have a similar composition to the Sun. The answer to that is temperature and gravity. A small, hot planet just doesn't have the gravity to retain fast moving hydrogen and helium atoms, unless they are trapped in some compound (like water!).
Thus, the small planets close to the Sun are depleted of light elements.
Toward the end of a stars lifecycle the star looses the ability to continue using hydrogen ect). To power itself, it begins to, (in a desperate attempt to live.) Create heavier elements such as iron. Now iron can't certainly not sustain a star.
As such the iron destroys the star, thus marking the end of its life cycle.
Small amounts of iron probably exist in stars, (from the universes point of view.) But it's not enough to actually effect the star it's in.
Iron is of course not the only things starsform that ultimately kill the star, I'm just using it as an example here.
None the less stars are quite interesting, just as anything else in space.
P.S. This is just my vary basic understanding of space, and I'm learning a lot on this website.
Have a nice day/night.