The formation of the Solar System began with the collapse of a region within a large molecular cloud. This collapse, likely triggered by a nearby supernova, led to the formation of a protoplanetary disk around a young Sun. Over time, particles within the disk collided and stuck together, forming planetesimals and eventually the planets.