The sun is a bit less than 2% elements heavier than helium, mostly carbon, oxygen, neon, and iron. While the hydrogen and helium contents are largely primordial, the heavier elements (known as "metals" to astrophysicists) were essentially all produced by stellar fusion in earlier generations of stars. The carbon, oxygen, and neon were formed by fusing three, four, and five helium nuclei, respectively; the iron is common because iron is the heaviest element that can be produced exothermically. Heavier elements (including multiple nutrients in our bodies) are only produced in meaningful quantities in supernovae, making us, as Carl Sagan put it, "made of stardust."
The presence of metals in stellar composition actually does have a significant impact on star formation and internal thermodynamics. The heavier elements, even present at only the 2% level, make the sun's ionized gas more opaque, since the rate of scattering of light by nuclei depends on $Z^{2}$. That actually speeds up star formation somewhat, since the higher opacity helps a collapsing proto-star trap heat more easily.