Lunar eclipses happen when the moon moves behind Earth, from the sun’s perspective. When the moon is completely swallowed up by the darkest part of the planet’s shadow, we see a total lunar eclipse.
https://www.nationalgeographic.com/science/space/reference/lunar-eclipses/

