The Sun doesn't burn itself out with its own heat and light intensity because it is in a state of equilibrium known as gravitational contraction and nuclear fusion.
The Sun produces energy through a process called nuclear fusion, where hydrogen atoms combine to form helium, releasing a tremendous amount of energy in the process. This energy is what we perceive as heat and light. The Sun's immense gravitational force compresses its core, creating high pressure and temperature conditions necessary for nuclear fusion to occur.
The balance between gravity's inward pull and the outward pressure generated by the energy released through fusion maintains the Sun's stability. The Sun's gravity holds its mass together, preventing it from collapsing under its own weight. At the same time, the energy generated by nuclear fusion exerts an outward pressure, counteracting gravity.
This equilibrium is sustained because the Sun maintains a delicate balance between its gravitational forces and the energy produced by nuclear fusion. The Sun's core temperature and pressure are precisely balanced to sustain fusion reactions without leading to an uncontrolled explosion or a collapse.
However, it's important to note that the Sun's fuel supply is finite. It has been estimated that the Sun has been shining for about 4.5 billion years and will continue to do so for another 5 billion years or so. Eventually, it will exhaust its hydrogen fuel and start fusing helium, leading to changes in its structure and an eventual expansion into a red giant. But for now, the Sun's equilibrium between gravity and nuclear fusion keeps it from burning itself out.