In Hebrew, the noun “Sabbath” is derived from the verb that means “to rest.”
The Israelites had many days of “rest” during the year, for their various festivals. Each of these was a sabbath. However, the “seventh-day” sabbath was a special case, in that it was quite frequent. It was embedded in the earliest Israelite account of creation, and therefore pre-dates the exodus from Egypt.
Yet in Israelite society, which was regulated according to the moon’s cycle, the early requirement to rest on the seventh day is likely to have meant resting on the seventh day of the moon’s monthly cycle, not resting every seven days, as we understand that practice.
Indeed, for a society that was nomadic and with limited literacy, to run two calendars, a weekly calendar and a monthly calendar is quite unlikely to have been practical.
In the period after the exile to Babylon, it is likely that the weekly observance of the Sabbath became the normal pattern, just as it is assumed to be Jewish religious practice in the New Testament.