The Earth takes 24 hours to complete one rotation. If the Moon was stationary in the heavens (not geostationary), then, to an observer on the Earth, the Moon would be directly overhead at 24 hour intervals.
But the Moon is not stationary. It orbits the Earth in the same direction as the Earth’s rotation.
The Moon takes 28 days to complete one rotation (360deg). When our observer on the Earth has completed one rotation (1 day) he will find that the Moon is not overhead but is 12.85deg east of his position (360deg/28 days) and that he will have to travel for longer before the Moon is overhead.
The Earth rotates at 15deg/hour so for any spot on the Earth the Moon will be directly overhead at approx 24 hours 50 min intervals.