British scientist Joseph Priestley discovered oxygen by removing it from the air.

This experiment was groundbreaking for understanding what oxygen is and how it works. Priestley isolated oxygen in its gaseous state not only to discover the element oxygen but to understand what it does. Priestley was not the first to experiment with oxygen, as Carl Wilhelm had similar findings the year before. However, his discovery was not published until 1777, making Priestley officially the first person to discover oxygen.

Source