✅The density of an object is what determines whether that object will sink or float. If an object or substance is less dense (having less weight) than other components in a mixture, it will float. When an object floats, it displaces a weight of fluid equal to its own weight.
Because, Air (or any gas) takes up space in water, just like solids. Air (or any gas) is less dense than water, so gas bubbles float to the top of water.