The Earth rotates on its axis eastward, causing the moon and sun, along with all the stars, to appear to move from east to west when viewed from Earth, as explained by NASA.
NASA further elaborates that the Moon orbits Earth in the same eastward direction as our planet's rotation. However, the Moon's movement along its orbit is relatively small compared to Earth's daily rotation, making it challenging to perceive the Moon's eastward motion. Nevertheless, during a solar eclipse, this motion becomes more apparent as the Moon crosses in front of the Sun from west to east.