There is no direct connection between the Moon moving away from the Earth and the expansion of space. These are separate phenomena that occur due to different reasons.
The Moon is indeed moving away from the Earth, but the process is extremely slow. It is estimated that the Moon is receding from the Earth at a rate of about 3.8 centimeters (1.5 inches) per year. This phenomenon is primarily attributed to tidal interactions between the Earth and the Moon. The gravitational interaction between the two bodies causes a transfer of angular momentum, resulting in the gradual expansion of the Moon's orbit and its movement away from the Earth. However, this movement does not have any direct impact on the expansion of space.
On the other hand, the expansion of space refers to the continuous increase in the scale of the universe. It is a fundamental concept in cosmology, supported by observational evidence such as the redshift of distant galaxies. According to the prevailing theory, known as the Big Bang theory, the universe began with a hot, dense state and has been expanding ever since. The expansion of space itself is a property of the universe and affects the distances between galaxies and other celestial objects. However, this expansion is not related to the motion of the Moon or the Sun.
In summary, while the Moon is gradually moving away from the Earth due to tidal interactions, this phenomenon is distinct from the expansion of space, which is a fundamental property of the universe on a much larger scale.