Why is gravity related to mass

Why is gravity related to mass

Gravity is the law of universal gravitation: in nature, any two objects are attracted to each other. The magnitude of gravity is directly proportional to the product of the mass of the two objects and inversely proportional to the quadratic power of their distance. Similarly, gravity is also directly proportional to the mass of objects and inversely proportional to the distance between them