Gravity played a fundamental role in forming our solar system about 4.6 billion years ago. The process began when a nearby supernova explosion sent shock waves through space, triggering the collapse of a large cloud of gas and dust called the solar nebula
. As the nebula collapsed under its own gravity, it began to spin and flatten into a rotating disk with a dense center. Gravity pulled most of the material toward the center, where the Sun formed. The remaining material in the disk gradually clumped together due to gravitational attraction, forming planetesimals-small solid objects that collided and stuck together through a process called accretion
. Heavier elements with stronger gravitational pull, like iron, coalesced quickly to form the cores of terrestrial planets such as Earth. Lighter materials formed outer layers and more distant planets. The rotation of the disk caused the material to spread out into nearly circular orbits, shaping the planets into spherical bodies as gravity pulled matter inward and smoothed their surfaces
. In summary, gravity caused the initial collapse of the solar nebula, concentrated mass to form the Sun, and drove the accretion of dust and gas into planets, moons, and other solar system bodies within a rotating protoplanetary disk