Archimedes’ principle states that any object, totally or partially immersed in a fluid, is buoyed up by force equal to the weight of the fluid displaced by the object. Meanwhile, Newton’s law of universal gravitation states that every particle attracts each other with force directly proportional to their masses & inversely proportional to the square of their distances.
Flat-Earthers like to characterize gravity as if it was “invented” to “replace” Archimedes’ principle & that the two are competing theories. In reality, these are two different theories that explain different phenomena. Gravity does not explain anything that Archimedes’ principle explains and vice versa. Gravity does not replace Archimedes’ principle; both are valid and in use today.