At any time, the Sun illuminates one half of the Moon and the other half dark. The phase of the Moon is the shape of the sunlit portion of the Moon as viewed by observers on Earth.
The phase of the Moon can never be adequately explained using the flat Earth model. To deal with this inconsistency in their theory, some perpetrators of flat Earth invented an ‘explanation’ that the phase of the Moon is not caused by sunlight. They are wrong. We can observe the Moon very carefully using telescopes of high-zoom cameras, and it will be evident how the lunar craters are lit. And this can only happen if the Moon is sunlit.