The verses you have quoted clearly state that it took SIX Days (Divine Days whose duration we do not know, not the Earthly days).
“Ask them, do you indeed deny Him who created the earth in two Days and do you set up equals with them. He is the Lord of the universe. He placed on the earth firm mountains, standing high, showered His blessings upon it, and ordained ˹all˺ its means of sustenance—totaling four Days —for all who ask. Then He turned towards the heaven when it was ˹still like˺ smoke, saying to it and to the earth, ‘Submit, willingly or unwillingly.’ They both responded, ‘We submit willingly.’ So He formed the heaven into seven heavens in two Days, assigning to each its mandate. And We adorned the lowest heaven with ˹stars like˺ lamps ˹for beauty˺ and for protection. That is the design of the Almighty, All-Knowing.”
Two days in creation of Earth, two days in filling the world with mountains, blessings and sources of food etc, so the verse that says “collectively four” refers to these two tasks. And then it took two days to give the final form to the skies/ heavens.