Isaac Newton formulated the law of universal gravitation, which adequately explained the motion of all bodies in space known at his time. He also showed it is the same law that is causing everyday objects to fall on Earth.
In his famous phrase “hypothesis non fingo,” Newton stated that he did not know what causes gravity and refused to speculate. Flat-Earthers use it to discredit him. In reality, just because he did not know what causes gravity, it does not mean his law of universal gravitation is wrong.