One illuminated half, different views
The Sun illuminates about half of the Moon. As the Moon orbits Earth, we see different portions of that sunlit half. The interval from one new Moon to the next averages about 29.5 days.
Not Earth’s shadow
The phases are not normally caused by Earth’s shadow. That shadow darkens the Moon during a lunar eclipse, which requires an appropriate alignment. At most full moons, the Moon passes above or below the shadow.
A simple experiment
Use a lamp to represent the Sun and a small ball for the Moon. Move the ball around yourself and observe how the visible lit portion changes. The model does not reproduce actual sizes or distances.