This cloud, called a nebula, also contained smaller amounts of heavier elements, like carbon, oxygen, nitrogen, and silicon.
Over millions of years, gravity caused the nebula to collapse and rotate faster, eventually forming the Sun at the center and the planets around it.