The energy production in stars is due to
nuclear fusion
In stars, hydrogen nuclei combine together to form helium nuclei and during this process it releases energy. This process is called nuclear fusion. Hence, in stars, the energy production takes place through nuclear fusion.