Here's a breakdown:
* Gravity and Distance: Gravity is a force of attraction between objects with mass. The strength of gravity depends on the mass of the objects and the distance between them. The more massive an object, the stronger its gravitational pull. The closer objects are, the stronger the pull.
* Earth's Influence: Earth is closer to the Moon than the Sun. Even though the Sun is much more massive than Earth, its gravitational pull on the Moon is weaker due to the vast distance.
* Orbital Dynamics: The Moon's orbital velocity is also important. It is moving fast enough to constantly "fall" towards Earth but miss, resulting in a circular orbit.
Imagine a ball on a string: If you swing a ball on a string, it constantly wants to fly off in a straight line. But the string (representing Earth's gravity) keeps pulling it back, resulting in a circular motion. The Moon is constantly falling towards Earth under its gravitational influence, but its orbital velocity keeps it from crashing into the planet.
In summary: While the Sun's gravity is a factor in the Moon's motion, Earth's gravity is stronger at the Moon's distance, making it the dominant force that keeps the Moon in orbit.