Please check the explanation …
As the solar nebula collapsed gravitationally its core region becomes dense and denser gets heated and its temperature and pressure increase with time.
In the mean time planetesimals coalesce to form planets. Inside the frost-line the temperature is not low enough for hydrogen compounds and helium to condense. Only rocks and metals can condense to form the inner rocky planets. Outside the frost-line the temperature is low enough for hydrogen compounds and helium to condense. So along with rocks and metals hydrogen compounds and helium condense. Since the solar nebula had more hydrogen compounds they make humongous outer planets.
At some point the density-pressure-temperature of the core region reaches a point where sustained nuclear fusion becomes possible. That is when is born. Once the sun is born the solar wind sweeps all the remaining un-condensed hydrogen compounds and helium far out into the space. Since the solar wind spreads out isotropically (spherically) these swept out hydrogen compounds and helium form a roughly spherical halo around the solar system.
Far out in space where the temperature is so low they condense to form comets. Thus the solar system acquires a spherical halo of comets called Oourt Cloud .