Question: how does the mass of an object affect gravity?
Answer: Objects with more mass have more gravity. Gravity also gets weaker with distance. So, the closer objects are to each other, the stronger their gravitational pull is. Earth's gravity comes from all its mass.