The sun is not a burning fire.
It's much much much hotter than that.
The sun's energy is the result of continuous nuclear fusion in it's core. We know how to do that on Earth, but the only thing we've been able to use it for so far is hydrogen bombs and other thermonuclear weapons.