Archimedes’ principle states that the upward buoyant force exerted on a body immersed in a fluid is equal to the weight of the fluid that the body displaces. Today we usually use B = -ρgV to calculate the buoyant force, where ρ is the fluid’s density, g is the gravitational acceleration, and V is the volume of the displaced fluid.
Archimedes discovered buoyancy earlier than Newton discovered gravity, and flat-Earthers dispute the presence of g in the buoyancy formula. In reality, buoyancy depends on the weight of the fluid, and the distinction between weight and mass only occurred after Newton. Archimedes’ principle still applies, only that we now have a better understanding of what weight is.