Peter was the one elected to tell us how God calculates time. IIPeter 3:8 But, beloved, be not ignorant of this one thing,
that one day is with the LORD as a thousand years, and a thousand years as one day.
So those days of creation are to us a thousand years per day. And by the end of the 7th day of rest Genesis 2:4 These are THE GENERATIONS OF THE HEAVENS AND OF THE EARTH (my King James has it all in caps as I typed) when they were created, in the day that the LORD God made the earth and the heavens.
Notice the usage of the word 'made' here instead of the word created in Genesis 1:1.
Or could the time be instantaneous. God said — and it happened? Immediately.
Another interpretation of 2nd Peter 3:8 that I’ve seen on FR threads from the past says simply the creation week was a foreshadowing of man’s time on Earth. Approx 4000 years of old testament history + 2000 years of new testament history + 1000 years of Christ’s millennial reign = 7 days or 1 week in God’s time.