It was formed approximately 4.6 billion years ago from the gravitational collapse of a region within a large molecular cloud most commonly found in the Milky Way galaxy. Over millions of years, the collapsing material formed a spinning disk, with the Sun coalescing at its center, growing hot and dense enough to initiate nuclear fusion.