The primordial dust cloud that formed our solar system was enriched by elements from supernovae, and shock waves from those same supernova explosions where what caused that dust cloud to start its gravitational collapse.
I have never understood one aspect of the primordial dust cloud theory of planetary formation.
This may be a really stupid question, but why are various elements contained in deposits and veins? I don't see any reason why iron, uranium, gold and other mineral atoms would gravitate toward each other. I would think that elements would be fairly evenly mixed.