When you're up in space there's not much oxygen available for the astronauts to breathe so the astronauts are usually wearing space suits with oxygen so that they can breathe and stay safe in space.
Since earth basically floats in space and earth contains a lot of oxygen space does have a small amount of oxygen but not very much.
You certainly could not live in space without oxygen.
There are very small amounts of pockets of oxygen in space but not enough to survive on like earth contains.
Earth contains the most oxygen and space does not.