The Sun is not made of fire, its energy comes from nuclear fusion at its core, where the temperature exceeds 15 million degrees and the pressure is immense.
Every second, it turns 600 million tons of hydrogen into 596 million tons of helium, the remaining 4 million tons of material become energy, a process that will continue over the next 5 billion years.