The most accurate response regarding the formation of the planets in the solar system is: The remaining materials from the sun's formation clumped together due to gravity.
This explanation aligns with the widely accepted nebular hypothesis, which states that the solar system formed from a rotating disk of gas and dust left over from the formation of the Sun. As the material in this disk coalesced due to gravitational attraction, it formed the planets.