The sun is made of fire but fire needs oxygen right? So..
Why can there be flames in space, while there's no oxygen?
Same idea as with the rocket engines of the spaceship, which also produce fire while there's no oxygen?
The Sun isn't "made of fire". It's made mostly of hydrogen and helium. Its heat and light come from nuclear fusion, a very different process that doesn't require oxygen. Ordinary fire is a chemical reaction; fusion merges hydrogen nuclei into helium, and produces much more energy. (Other nuclear reactions are possible.)
As for rockets, they carry both fuel and oxygen (or another oxidizer) with them (at least chemical rockets do; there are other kinds). That's the difference between a rocket engine and a jet engine; jets carry fuel, but get oxygen from the air.
Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?