how is the energy of star produce​