The gases come together due to gravity and form a nebula which further form a star. it alo come sfrom
Universe, galaxy,nebula,solar system, star, planet
Gravity.
The hypothesis on how the solar system was formed is known as the solar nebula theory. This theory posits that the solar system formed from a massive, rotating cloud of gas and dust called the solar nebula. Over time, gravity caused the material in the nebula to clump together, eventually forming the sun and the planets.
All of the celestial bodies in the solar system are believed to have formed from a spinning disk of gas and dust called the solar nebula, which collapsed under gravity around 4.6 billion years ago. This process, known as the solar nebula theory, explains the formation of planets, moons, asteroids, and comets in our solar system.
The solar system formed from a spinning cloud of gas and dust called a nebula. Over time, this nebula collapsed under its own gravity to form the Sun and the rest of the solar system.