To see why humid air is less dense than dry air, we need to turn to one of the laws of nature the Italian physicist Amadeo Avogadro discovered in the early 1800s. In simple terms, he found that a fixed volume of gas, say one cubic meter, at the same temperature and pressure, would always have the same number of molecules no matter what gas is in the container. Most beginning chemistry books explain how this works. Imagine a cubic foot of perfectly dry air. The final one percent is a mixture of other gases, which we won't worry about.
Molecules are free to move in and out of our cubic foot of air.
The water molecules that replace nitrogen or oxygen have an atomic weight of 18. This is lighter than both nitrogen and oxygen. True, liquid water is heavier, or more dense, than air. But, the water that makes the air humid isn't liquid. It's water vapor, which is a gas that is lighter than nitrogen or oxygen.