GENESIS 2:4
These are the generations of the heavens and of the earth when they were created, in the day that the LORD God made the earth and the heavens, [Genesis 2:4 AKJV]
This is the account of the heavens and the earth when they were created, in the day that the Lord God made them. [Genesis 2:4 BSB]
For purpose of understanding, I must differentiate between "the previous account" and "this account" of God's creation, for your sake.
*1* The Previous Account - "Genesis 1" till "Genesis 2:3" – is the account of "Time" or "Days and Nights" especially the first one week.
*2* But this Account – From "Genesis 2:4" till end of "Genesis 3" – is the account of "First Heaven" or "Garden of Eden."
As you can see, the Bible verse above said it's the generations or account of the heavens and the earth when they were created, in the "DAY" when the "LORD" God made "THE EARTH AND THE HEAVENS." Note the three sets of words I made stronger in this paragraph, for I have few brief to say under them:
DAY
This account only has "Day" but has no night because there was no night in the first heaven or paradise. The Days were not reading or counting, and so it was a long day but the same Day from the time the heaven and earth were created till the time Adam and Eve were driven away from the Garden, all was done in the same Day. This is unlike how the previous account would have said, "Evening and Morning, first day, second day,... sixth or Seventh Day etc. This Account only unified the whole timeline into just "One Day" and the first sunset (evening) and sunrise (morning) witnessed by Adam and Eve were after they were cast out of the Garden (Heaven on earth) where only Day existed, and no night or sun timezones.
You may discover from this account, that all the living creatures on earth were made in the same day including all the plants in the garden. The previous account would put plants created first before animals before mankind; but here in this account, man was made first before planting, before animals, and finally before the Woman, all in one and same Day.
LORD
This Bible verse above is the first to introduce the Creator God as the "LORD God" and the word "the LORD" began to appear in the Bible.
THE EARTH AND THE HEAVENS
The Earth and the Heavens were one, hence the Garden of Eden was the First Heaven. After the fall of mankind, and lost of the Garden of Eden, there was a second heaven, which is where we are now because the world or the earth is currently under wickedness and the princes of wickedness in heavenly places.
[1 John 5:19] — "And we know that we are of God, and the whole world lies in wickedness."
[Romans 8:22] — "For we know that the whole creation groans and travails in pain together until now."
But there is in the future "The Third Heaven" which shall be far greater than the first heaven because in the third heaven the Tabernacle of God will be dwelling with mankind on earth, and there shall once more be no more night nor sun, as it was in the first heaven or garden of Eden. Behold we are in the second heaven, under the sun, having nights, days getting numbered for us to reach our death, life difficult, sorrows and solutions, vanity of vanities, toils and pleasures, etc.