Facts

Do we need trees for oxygen?

No. Compared to the oxygen reserves in the atmosphere, trees produce a very tiny amount. Considering all the vegetation on the Earth, trees also don't contribute much. The oceans produce far more oxygen than trees. Remember that the purpose of photosynthesis is not to produce oxygen, but to produce sugars.