The Moon appears to disappear at times due to a phenomenon called lunar phases. As the Moon orbits around the Earth, the relative positions of the Sun, Earth, and Moon change, resulting in different amounts of the Moon's illuminated surface being visible from our perspective on Earth.
The primary cause of the Moon's phases is the interaction between the Sun, Earth, and Moon. When the Moon is positioned between the Earth and the Sun, with the Sun directly behind it, the illuminated side of the Moon faces away from us, resulting in what is known as the "New Moon" phase. During this phase, the Moon appears dark and is not visible to us.
As the Moon continues its orbit, we start to see a thin crescent of illuminated surface as it becomes partially visible. This is known as the "Waxing Crescent" phase. The Moon goes through several more phases, such as First Quarter, Waxing Gibbous, Full Moon, Waning Gibbous, Third Quarter, and Waning Crescent, before returning to the New Moon phase.
The changing lunar phases occur because of the way sunlight interacts with the Moon and how that illumination is visible to us from Earth. The portion of the Moon that is illuminated by the Sun depends on the Moon's position in relation to the Sun and Earth, resulting in the various phases we observe throughout the lunar cycle.