In the name of Allah, the Gracious, the Merciful
The Quran says that Allah created the heavens and the earth in six days, in which “day” means an epoch of time only known to Allah. As Allah said:
إِنَّ يَوْمًا عِندَ رَبِّكَ كَأَلْفِ سَنَةٍ مِّمَّا تَعُدُّونَ
Verily, a day with your Lord is like a thousand years of those which you count.
Surat al-Hajj 22:47
Some people have misinterpreted the passage in Surat Fussilat to mean that Allah created the universe in eight days.
قُلْ أَئِنَّكُمْ لَتَكْفُرُونَ بِالَّذِي خَلَقَ الْأَرْضَ فِي يَوْمَيْنِ وَتَجْعَلُونَ لَهُ أَندَادًا ۚ ذَٰلِكَ رَبُّ الْعَالَمِينَ وَجَعَلَ فِيهَا رَوَاسِيَ مِن فَوْقِهَا وَبَارَكَ فِيهَا وَقَدَّرَ فِيهَا أَقْوَاتَهَا فِي أَرْبَعَةِ أَيَّامٍ سَوَاءً لِّلسَّائِلِينَ ثُمَّ اسْتَوَىٰ إِلَى السَّمَاءِ وَهِيَ دُخَانٌ فَقَالَ لَهَا وَلِلْأَرْضِ ائْتِيَا طَوْعًا أَوْ كَرْهًا قَالَتَا أَتَيْنَا طَائِعِينَ فَقَضَاهُنَّ سَبْعَ سَمَاوَاتٍ فِي يَوْمَيْنِ وَأَوْحَىٰ فِي كُلِّ سَمَاءٍ أَمْرَهَا ۚ وَزَيَّنَّا السَّمَاءَ الدُّنْيَا بِمَصَابِيحَ وَحِفْظًا ۚ ذَٰلِكَ تَقْدِيرُ الْعَزِيزِ الْعَلِيمِ
Say: Do you indeed disbelieve in He who created the earth in two days and attribute to Him equals? That is the Lord of the worlds. He placed on the earth firmly set mountains over its surface, and He blessed it and determined therein its sustenance in four days without distinction – that is for those who ask. Then He directed Himself to the heaven while it was smoke and said to it and to the earth: Come, willingly or by compulsion. They said: We have come willingly. He completed them as seven heavens within two days and inspired in each heaven its command. We adorned the nearest heaven with lamps and as protection. That is the determination of the Almighty, the Knowing.
Surat Fussilat 41:9-12
The confusion occurs because two days are mention in verse nine, four days in verse ten, and two days in verse twelve. However, it is understood that the four days in verse ten include the two days in verse nine.
Ibn Abbas explained the verse, saying:
فَجُعِلَتْ الْأَرْضُ وَمَا فِيهَا مِنْ شَيْءٍ فِي أَرْبَعَةِ أَيَّامٍ وَخُلِقَتْ السَّمَوَاتُ فِي يَوْمَيْنِ
Allah created the earth and everything in it in four days, and He created the heavens in two days.
Source: Ṣaḥīḥ al-Bukhārī 6/127, Grade: Sahih
The creation of the heavens after the creation of the earth does not necessarily refer to the stars or celestial bodies, but rather to the realm of angels and heavenly beings contained in the Unseen (al-Ghayb) beyond the perception of human beings.
هُوَ الَّذِي خَلَقَ لَكُم مَّا فِي الْأَرْضِ جَمِيعًا ثُمَّ اسْتَوَىٰ إِلَى السَّمَاءِ فَسَوَّاهُنَّ سَبْعَ سَمَاوَاتٍ ۚ وَهُوَ بِكُلِّ شَيْءٍ عَلِيمٌ
It is He who created for you all of that which is on the earth. Then He directed Himself to the heaven and made them seven heavens, and He has knowledge of all things.
Surat al-Baqarah 2:29
Therefore, the passage in question does not say Allah created the universe in eight days. Rather, it explains the creation of the earthly realm in four epochs and the subsequent creation of the hidden heavenly realms in two epochs.
Success comes from Allah, and Allah knows best.