Massive stars produce light and heat through nuclear fusion, a process that releases enormous amounts of energy from their cores.…