I've wondered this myself, and haven't found much by way of clear answers in the literature. In part I suspect this is because a fair bit of the transmutation process has only been worked out relatively recently.

I have a few hunches though. Mind this is all conjecture.

Different elements form at different stages of stellar evolution. For the lighter elements (helium, carbon, neon, oxygen, silicon, iron), these are thought to actually form in distinct shells within the star. Note that only iron and silicon are solids at most temperatures we'd encounter.

https://en.wikipedia.org/wiki/File:Evolved_star_fusion_shell...

https://en.wikipedia.org/wiki/Stellar_evolution

Iron in particular forms in high abundance as the final fusion product. I don't have a good sense of what happens with it, but I suspect there's a distinct iron-emission that occurs from a sufficiently large nova or supernova.

Once in open space, you've got a rapidly-cooling plasma that eventually cools to gaseous and liquid phases of these materials. To an extent there's probably some effective distillation going on, where lighter (and more volatile) elements boil out of the cooling iron, possibly reacting with it (in the case of oxygen). Given that we're talking a star-sized mass, even if only some of the ejecta consolidates, those will tend to form large clumps. Eventually, some of these start interacting under their local gravitational potential.

For heavier elements, I'm assuming that there is similarly preferential formation based on conditions such that given a certain set of temperatures and pressures, lead or gold or copper or other elements are more likely to be formed. (Lead is also a daughter product of many fissionalbe elements.) Again, there may be some clustering of such elements.

And where large quantities conglomerate --- dwarf-planet through planetary masses --- then you'll see density stratification within a molten or semi-molten mass (the heat coming from both residual temperature and residual thermal energy of gravitational potential, probably also heavy elements fissioning at object cores). This again gives at least a rough stratification. So you get planetoids / protoplanets with material segregating by mass. If those survive long enough, convention starts occurring, which probably mixes up materials to an extent. And if there are enough such bodies, they collide such that what was an interior iron-nickle-rich core is now floating through space on its own as what we'd call a meteor or asteroid.

I'm not sure which of these segregation/aggregation mechansims dominates. Thinking it through, I suspect that the principle result of the initial explosion is mostly dust and smaller-particle dispersion, and that more effective seggregation occurs as more substantial bodies form, and more robust differentiation processes can emerge.

I commented on a similar question a few months ago here: https://news.ycombinator.com/item?id=27924151

I'd turned up one of the few substantive articles I could find on the question at the time, which largely discusses chondritic meteorites:

"Dating the Earliest Solids in our Solar System"

http://www.psrd.hawaii.edu/Sept02/isotopicAges.html