The year obviously can be tied to the movements of the sun, and the seasons. The month can be linked to the moon. So where does the idea of a 7-day week come from?
It doesn't fit particularly easily into either the year or the month so I can't really see any source or reason for it. There's the obvious Christian resonance with the 7 days of creation, so does it originate in the Christian liturgical calendar?
There’s a very well done answer to this in the frequently asked side bar. I’ll link it here.
Edit: u/itsallfolklore is the author