According to Exodus 24, the cloud covered Mount Sinai for six days before God called Moses from it on the seventh day.
After Moses went up the mountain, the cloud covered Sinai and the glory of the Lord appeared like a consuming fire to the Israelites below. The text says that Moses entered the cloud and remained on the mountain for forty days and forty nights, but that longer period begins after the call on the seventh day.
This distinction explains why answers of forty days and seven days can seem plausible. Forty days and nights describes Moses’s stay on the mountain, while six days describes the period during which the cloud covered it before the divine summons. The seventh day is the day on which God called Moses.
The scene follows the covenant ceremony in which Moses read the covenant book and the people affirmed their obedience. It marks a transition from the covenant’s public confirmation to Moses receiving further instructions.