Evolution of Solar system
The formation of the Solar System is estimated to have begun 4.6 billion years ago with the gravitational collapse of a small part of a giant molecular cloud.
Sun is one of a few hundred billion stars in the Milky Way Galaxy, which together form a flattened disc shaped system which is roughly a hundred thousand light years across and a couple of thousand light years thick.
The solar system is about two–thirds of the way out from the center to the edge of the disc, orbiting around the center of the disc. It takes about 225 million years to complete one orbit, at a speed of 250 km per second and this time period is called cosmic year. The stars of the disc form in groups out of a single large, collapsing cloud of gas and dust.
Our Sun is formed this way about five billion years ago, completing about twenty orbits from its life time to date and is half way through its life cycle as of now. The cloud of stuff from which Sun and its family formed consists of mostly Hydrogen and Helium.
The Protons of four Hydrogen nuclei combine to make one Helium nucleus. The total mass of the helium nucleus (alpha particle) is 0.7 percent less than the mass of four protons which combined and this mass is converted into pure energy every time this synthesis happens.
Five million tones of of mass are converted into pure energy every second and in the last five billion years, Sun consumed about 4 percent of its initial supply with just 0.7 percent of that 4 percent is converted into radiation. The mass equivalent of energy radiated so far is about hundred times the mass of the Earth.
In about five billion years from now, the Sun would consume all the Hydrogen present in it and may become white dwarf after another billion years or so. Hence, we need not worry about our source of energy for another five billion years.