Rest of the material forms into a flattened disk orbiting around the newly forming star. When infall of material ceased, the disk began to cool. Solid particles of carbon and ices like water, ammonia, methane and CO 2 begin to condense out. Material several AU away remains cold, and ices can exist. Large objects form.
Process is called accretion .
Rocky cores near sun become terrestrial planets. Further from sun rocky cores accrete more ices and grow to giant proportions. But the process continues at a slower pace. Initially remaining material is swept up by existing planets, slowing the process still further. This shows up as intense cratering of planets.