Elements heavier than hydrogen and helium were actually produced inside stars.
Examining the periodic table, the elements up till iron were produced during the lifetime of the star (as a part of the fusion process) while elements heavier than iron were produced during the explosions of the supernova.