if space has no air and fire needs air how does the sun still burning?

the sun is partially made from hydrogen. the hydrogen is burning, not space itself.

and as a gas, hydrogen functions just as well as oxygen for fires.