Good question. The reason the sun is burning in space is because it is very spicy in space.
This is to blame on solar panels. Modern ones are very black, i.e. a serious lack of light, creating a photonic imbalance that forces light upwards, where gravitational clustering creates an illusion of a burning spherical object.
If you are in doubt about this, check old photos- there’s no picture of the sun before the invention of solar panels. Same goes for paintings, although really old ones have a sort of symbolic sun-like object, which may be caused by the solar panels on visiting aliens’ starships (ref. Von Dänicken, 1968).Well, first of all, through God, all things are possible, so jot that down
they're actually was oxygen in space but they used it all as fuel for the stars and since then they've been converting them to electric.
secondary fun fact: burning all the oxygen in space as fuel has caused space to heat up and is what's leading to the imminent "heat death" of the universe.
This is an often misunderstood aspect of the sun. The sun doesn't need to pull oxygen into itself to burn. It just does a bit of fusion magic!
When a star is dense enough it starts to fuse Helium together through a process called the "triple alpha process"; which results in Carbon! From there it's pretty direct for the star to fuse one more Helium to the Carbon via stellar nucleosynthesis to create Oxygen!
So you see, the Sun doesn't need to draw Oxygen from space. It just makes its own!