You can produce oxygen from water, iron ore (O'Neill and other sci-fi writers somehow missed that astronauts brought back top quality iron ore from the moon,) stony rocks, etc.
To do it from water for instance you could use electricity to split up the H2O molecules; you could directly use the resulting O2 or you could use the H2 to reduce the iron ore back to H2O and thus recycle the H2. Maybe you get electricity from solar panels or a nuclear reactor.
You could burn this with cosmic hydrocarbons but you have only accomplished energy storage as opposed to an energy source. You are then competing with a sun that shines all the time and every other energy storage technology as well as nuclear fission, fusion, and decay.
The oxygen rich environment is the gift we get from plants here on Earth, ultimately they have stored a lot of "energy" in the atmosphere which we can tap.
Future wildcatters will see asteroid hydrocarbons as the material to make human bodies and cattle, everything from wood to plastics to pharmaceuticals -- every bit as much of a gold rush, but not a new energy source.
If you could make plastics from asteroid materials you could blow very large films and coat them with layers of metals and semiconductors and thus function as solar sails if not energy collectors -- these could sail to their destinations on their own power, say to be installed at the Earth-Sun L1 point to fight global warming.
Anyhow it took people a long time to get oxygen right. Cave men "mastered" fire but people couldn't make steel commercially until people understood that 80% of the atmosphere is inert stuff that goes along for the ride.