The correct view is that Allah created the heavens, the earth, and everything between them in six days.
Allah says, "Indeed, your Lord is Allah, who created the heavens and the earth in six days, then He rose over the Throne" (7:54).
And He says, "It is Allah who created the heavens and the earth and everything between them in six days, then He rose over the Throne" (32:4).
And He says, "Indeed, We created the heavens, the earth, and everything between them in six days" (50:38).
These six days are Sunday, Monday, Tuesday, Wednesday, Thursday, and Friday. Nothing was created on the seventh day, Saturday, which is why it is called al-sabt, from al-qaṭʿ (cutting off).
Abū Hurayrah is reported to have said, "Allah created the soil on Saturday, the mountains on Sunday, the trees on Monday, the disliked things on Tuesday, and the light on Wednesday. He scattered the beasts on Thursday, and created Ādam last of all, after ʿaṣr on Friday, in the final hour of Friday, between ʿaṣr and nightfall." Muslim, Aḥmad, and al-Nasāʾī recorded the narration through several routes, and it describes the creation as having taken place over seven days.
However, al-Bukhārī and other leading scholars of ḥadīth held that it is not the saying of the Prophet ʿalayhi al-salam, but Abū Hurayrah's account from Kaʿb al-Aḥbār, which some narrators mistakenly attributed to the Prophet. As such, it lacks the evidentiary weight to oppose the verses of the Quran or the authentic marfūʿ narrations, and cannot be cited as evidence against them.
— Aḥmad al-Dwaysh, Al-Lajnah al-dāʾima, i. 9-10