The current view seems to be that particles in the ring of debris surrounding a newly formed star accreted into clumps through gravity and eventually these clumps attracted each other till sufficient gathered in one place to form a planet.
However we know that most if not all planes have a metal core, mainly iron and nickel. The current suggestion is that, at some point in the formation, all this iron and nickel somehow dropped into the core. This has always bothered me. How come only the iron and nickel dropped? What triggered it?
It seems to me more likely that the iron/nickel cores formed first and acted as gravitational attractors for the other materials. An accretion disc around a forming star has a lot of iron and nickel from the supernova which preceded the star formation and there is no reason why a good portion of it could be in molecular form. It has to be in molecular form to be magnetic.
The motion of the disc through the magnetic field surrounding the forming star will create eddies and currents. This COULD magnetise the molecular iron and nickel and we know how rapidly magnetised particles will seek each other out and clump.
This seems to me a more efficient way to form cores on which other materials can accrete through gravity and solve the messy problem of how iron/nickel are required to ‘drop’ to the core after the formation of a planet.
The materials which accrete later will depend on where in the disc the metallic core lies, ergo the formation of rocky planets and gas planets but all forming around a metal core.