Why do temperatures on the moons surface vary ncyb more than temperatures on earth

The moon has a lord density than earth

The moons surface has more craters than earth

The moon has no atomsphere

The moon is farther from the sun compared to earth