Dr Wooten's astronomy program closely paralleled this topic Friday night. Actually he picked up after the first generation of stars were born which were very large and composed entirely of hydrogen. As these non-metallic stars died, exploded and formed successive generations of other stars more and heavier metals were created.
Toward the end of the presentation he explained how the heaviest of elements were formed, estimating a Earth size glob of gold was formed by recent evidence of colliding neutron stars.