How are the significant differences in chemical composition and mass between the terrestrial planets and the giant planets explained?

After ejection by the Sun into the surrounding space about half of the substance, the intensity of its radiation decreased and stabilized. In the nearest zone near the Sun, the temperature dropped sharply and there was a transformation of substances from the gaseous phase into solid particles. The first condensed vapors of refractory metals and their compounds. At a distance equal to the radius of Jupiter’s orbit, and at farther distances from the Sun, where the intensity of solar radiation was much weaker, ice particles from frozen water, methane, solid carbon dioxide with admixtures of dust and refractory substances remained in the cloud. This is the composition of the planets Jupiter, Saturn, Uranus and Neptune,

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.