Where Did All Heavy Elements In The Sun Come From?

Where Did All Heavy Elements In The Sun Come From? Most heavy elements were formed in heavy stars of previous generations, that exploded in supernovae and spread them into the interstellar medium. From that medium the Sun formed, this is why it contains heavy elements (only about 1.5% in mass). Where did the elements in