It may have begun with a shove. A nearby exploding star sent a shockwave rippling through a vast, slowly rotating cloud of gas and dust, and that nudge was enough to let the cloud start collapsing under its own gravity.
As it fell inward, it spun faster and flattened — the same way a figure skater speeds up by pulling in their arms — until it became a swirling disk with a dense, heating knot at the center. That knot ignited into the young Sun. The flattened leftovers around it formed a protoplanetary disk, the nursery where worlds are made.
Inside that disk, dust grains drifted, collided, and stuck together — growing into pebbles, then boulders, then kilometre-wide bodies called planetesimals. These swept up everything in their path, and the biggest winners snowballed into planets. Close to the Sun it was far too hot for ice, so the inner worlds — Mercury, Venus, Earth, Mars — were forged from rock and metal. Earth assembled itself this way, growing through countless collisions over tens of millions of years.