You are confusing planetary formation with the generation of heavy nuclei by supernova explosions. Nucleosynthesis in the history of Big Bang and up to now , is independent of the process of planet formation, though it provides the heavy nuclei in the planets.
Nucleosynthesis is the process that creates new atomic nuclei from pre-existing nucleons, primarily protons and neutrons. The first nuclei were formed about three minutes after the Big Bang, through the process called Big Bang nucleosynthesis. It was then that hydrogen and helium formed to become the content of the first stars, and this primeval process is responsible for the present hydrogen/helium ratio of the cosmos.
With the formation of stars, heavier nuclei were created from hydrogen and helium by stellar nucleosynthesis, a process that continues today. Some of these elements, particularly those lighter than iron, continue to be delivered to the interstellar medium when low mass stars eject their outer envelope before they collapse to form white dwarfs. The remains of their ejected mass form the planetary nebulae observable throughout our galaxy.
Supernova nucleosynthesis within exploding stars by fusing carbon and oxygen is responsible for the abundances of elements between magnesium (atomic number 12) and nickel (atomic number 28).1 Supernova nucleosynthesis is also thought to be responsible for the creation of rarer elements heavier than iron and nickel, in the last few seconds of a type II supernova event.
This still is happening.
The formation of planets
Our Sun belongs to the generation of stars created 4.6 billion years ago, when our galaxy was roughly half its present age. A cloud of interstellar gas, dust and ices, containing several generations of material, collapsed to form the nebula from which the Sun and the rest of our solar system grew. This collapse may have been triggered by a nearby supernova. Cosmologists believe that because the material in the nebula was rotating to some degree, not all of the nebular material fell directly into the central mass that would become the Sun.
Hydrogen is ubiquitous in our present universe:
Hydrogen and helium account for nearly all the nuclear matter in today's universe. This is consistent with the standard or "big bang" model.
The interstellar gas is mainly hydrogen and helium, dust and ices contain left overs from supernova explosions and the collapse of stars into white dwarfs so no problem to model the sun to contain mainly Hydrogen and helium, and for planets to have the high mass nuclei they have.