Hydrogen is the most common element in the universe, and about 75 percent of the sun today is hydrogen  This suggests that hydrogen was the main component of the solar system when it formed
With the formation of the Sun, most of the solar system's material was concentrated in the Sun, while outside the sun, the elements were stratified: close to the Sun, the temperature was very high, leaving only the relatively heavy elements such as silicon, iron, oxygen, these elements together to form mercury, Venus, Earth and other rocky planets; Farther away from the Sun, as temperatures cool, the proportions of these elements decrease, and the planet's atmosphere becomes dominated by hydrogen, with some nitrogen, such as Jupiter and Saturn; At the edge of the solar system, there are few heavy elements, mostly water ice, methane and so on
The influence of temperature on the solar system's material composition