When the phase of the moon is between new moon and half moon, then the moon is nearer to the sun. Or when the phase is from Half Moon to full moon, the earth is nearer.
It's scientifically proven that the earth IS extremely slowly getting closer to the sun because the gravitational pull of the sun is really strong but we won't collide with the sun before it expands...