You have studied in your earlier classes that stars such as Sun produces their own heat and light. It is due to
Nuclear fusion between Hydrogen to form Helium
Sun produces its own energy through a process called nuclear fusion. It is a chemical reaction. In this process, a huge amount of heat is released.