That happens at half-moon, when the Moon is at the right-angle of a right-angled triangle. The acute angle of the triangle is at the Sun and it is only 0.147 degrees on average.
At half-moon you can look at the Moon, and the Sun is approximately 90 degrees to the right or the left, depending on whether the Moon is waxing or waning.
If the moon was on the left and the sun was on the right, it would suggest that the moon is in its waxing phase moving towards a full moon. This positioning is a natural occurrence based on the moon's orbit around the Earth and the Earth's orbit around the sun.
Sun-Moon-Earth form a right triangle in this case.
They are at 'right-angles', with the Earth at the corner of the right angle.
Third quarter moon
When you see a half moon, the position of the Sun is either directly to the right or left of the Moon as viewed from Earth. This is because a half moon occurs when the Sun, Earth, and Moon form a 90-degree angle, with the Sun illuminating half of the side facing Earth.
When the Sun, Earth, and Moon form a right angle, this configuration occurs during the first and third quarters of the Moon's phases. In this alignment, the Earth is positioned between the Sun and the Moon, resulting in a partial illumination of the Moon's surface as seen from Earth. This phenomenon is significant in understanding tidal effects, as the gravitational forces exerted by the Sun and Moon create varying tidal patterns.
full moon
It has to do with the orbit of the Sun, the Moon, and the Earth all in the right place at the right time. The Sun must be rotated at a certain degree from the Earth to block the moon, and vise-versa for the Moon to the Sun.
As "Pink Floyd" said " when the sun is eclipsed by the moon." Your viewing position has to be right to see it happen.
When the sun, Earth, and moon are at right angles, we experience either a first or third quarter moon phase. The sunlight illuminates half of the moon that faces Earth, creating the distinct crescent shape that we observe.
sun earth and moon
When the Sun, Moon, and Earth from a right angle and the gravitational pull of the Sun counteracts the pull of the Moon