Which scientific theory explains the origin of the Earth?

The Nebular Hypothesis is a scientific theory that explains the formation of the Earth and solar system. According to this theory, the solar system originated from a vast cloud of gas and dust known as a nebula. Gravity eventually forced the nebula to collapse and spin, generating a protostar at its center. The protostar continued to accrete mass until it started nuclear fusion and became the Sun. Meanwhile, the leftover material in the disc around the Sun consolidated to create planets, including Earth.