The sun is currently fusing hydrogen into helium in its core, and it has been doing so for about 4.6 billion years. The fusion process will continue for another 5 billion years or so, until the hydrogen in the core is depleted. At that point, the core will start to contract and heat up, which will cause the outer layers of the sun to expand and cool, turning the sun into a red giant.

During the red giant phase, the sun will start to fuse helium into heavier elements, such as carbon and oxygen. Eventually, the core will become hot and dense enough to fuse helium into even heavier elements, such as neon and magnesium. However, the sun will never be able to fuse elements to produce iron because iron is the most stable element and fusion of iron requires more energy than it releases.

In about 5 billion years, the sun will exhaust all of its fuel and become a white dwarf, a small, dense, and incredibly hot object that will gradually cool over billions of years.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence