The orbit of the moon around the earth is tilted at an angle of about 6 degrees from the plane of the earth’s orbit around the sun.
As a result, the moon is usually above or below the line between the earth and the sun, except on certain predictable occasions.