Uh, yes we do.
The elements heavier than helium were produced in the cores of stars and by overpressure from novae.
A cloud of dust with an abundance of these heavier elements was formed by prior star deaths. This cloud began to collapse and rotate, leading to our solar system's protoplanetary disk.
As our planet coalesced, the heaviest elements fell toward the core, and the lighter elements and molecules did not. These materials were also then supplemented on and near the surface by matter infalling from the solar system., nearly all of which was also part of the protoplanetary disk.