There’s Archimedes’ principle: “Any object, wholly or partially immersed in a fluid, is buoyed up by a force equal to the weight of the fluid displaced by the object.”
It’s not a matter of how much air is in the object. But we as humans have easy, free access to air, and air is less dense than water, so that’s what we use in a lot of our inventions to achieve buoyancy.
It’s a matter of density. A jar of salad dressing left out for a while, the ingredients will all separate into layers, not because of how much air is in one layer and not in the other, but because some ingredients are less dense. In a room, you know that heat rises and cold falls. If you have two balloons, one filled with air, another filled with helium, the helium one is the one that’ll float away on you. There are some gases more dense than air, such as Sulfur hexafluoride, which is great at science fairs.