The initial chapters of Genesis contain summarised statements of accomplishment, not statements of mechanism.
==============================================================================================
Day – Hebrew יוֹם (yowm) – Strong’s H3117 – Strong: a day (as the warm hours), whether literal (from sunrise to sunset, or from one sunset to the next), or figurative (a space of time defined by an associated term) – Brown-Driver-Briggs: day, time, year, day (as opposed to night), day (24 hour period), evening and morning, a working day, a day's journey, time, period (general), year, days, lifetime (pl.), etc.
Genesis 1:5: And God called the light, Day. And He called the darkness, Night. And the evening and the morning were the first day
Genesis 1:16: And God made two great lights: the greater light to rule the day and the smaller light to rule the night, and the stars [also.]
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 4:3: And in the end of days, it happened, Cain brought to the LORD an offering of the fruit of the ground.
Genesis 6:4: There were giants in the earth in those days. And also after that, when the sons of God came in to the daughters of men, and they bore to them, they were mighty men who [existed] of old, men of renown.
Genesis 6:5: And the LORD saw that the wickedness of man [was] great in the earth, and every imagination of the thoughts of his heart [was] only evil continually.
Genesis 18:11: Now Abraham and Sarah [were] old, far gone in days, and it had ceased to be with Sarah after the manner of women.
Genesis 27:44: and stay with him a few days until your brother's fury turns away,
Genesis 27:45: until your brother's anger turns away from you and he forgets what you have done to him. Then I will send and bring you from there. Why should I also be bereaved of both of you [in] one day?
Isaiah 34:8: For [it is] the day of the LORD's vengeance, the year to repay for the fighting against Zion.
Ezekiel 30:3 For the day [is] near, even the day of the LORD [is] near, a cloudy day. It shall be the time of the nations.
==============================================================================================
Evening and morning – What happens in the evening? Colours fade, detail becomes indistinct, visual perception descends into chaos. What happens in the morning? Colours appear, leaves on trees become distinguishable, corners on buildings become progressively more distinct.
The expression “the evening and the morning were” denotes God’s progressive creation of order out of chaos during the particular time period noted.
The “days” coincide with phases of the Earth’s formation and population with life, as determined by modern science. (There is one apparent deviation from that – but is it simply a translation problem?)
The “days” (formation and population phases) are recorded with accuracy, as though the author was observing the process from, or near, the Earth’s surface. And from that perspective, all the “problems” dissolve. (If Readers do not get why that is so, please ask for clarification.)
The obvious question then arises: How did that author know?
==============================================================================================
The gap theory, postulates that between the creation of the Earth mentioned in Genesis 1:1, and Genesis 1:2, there is a large time gap. The idea seems to have been initially formulated to harmonise what appeared to be indisputable evidence of a very old Earth, with the concept of 6x24-hour-days-of-creation. It is often associated with a pre-Adamic civilisation destroyed by Satan, allowing Verse 2 onwards to be a recreation. The latter idea is demolished by Satan being in the Garden of Eden before he became Satan. The former idea is quashed by the science-connected phases recorded.
==============================================================================================
Mimicking Mesopotamian law and literature – Actually, the shoe might be on the other foot. The myths etc. of pagan civilisations could be seen to be simply distortions of the original history. See how quickly the Israelites descended into paganism each time God delivered them from the penalty of their previous lapse. It only took one generation.
Abram’s (Abraham’s) and Noah’s lives overlapped by around 60 years. And Abram lived in the city that was the logical expansion of Noah’s original post-Flood settlement. It would make sense that Abram learned about the true God and original history from the well-known but largely ignored Noah.