I've been told the whole Genesis narrative was essentially political propaganda based on the Babylonian creation account in the Enuma Elish and written during the Babylonian exile.
I don't know how accurate that is but they do share similarities and given the relative cultural influence of Babylon I wouldn't doubt some influence was there.
Those are basically two different theories to account for the similarities. The one where the hebrews picked up the myth during captivity in babylon is mostly out of favor currently though it has some reputable proponents.
"Political propaganda" isn't quite how I would put it but yes a slightly more main stream theory is that genesis is an intentional reconfiguration of a myth that would have been widely known in the region, for the purpose of repudiating the mesopotamian religion in favor of the hebrew one.
Either way, or both, or neither, the story was "in the air" in the eastern mediterranean/west asia at that time. It was widely known and incredibly influential, and bits of it turn up in basically all significant literature with its roots in that place & era. Scholars go back and forth on the archeological and linguistic evidence but it's fairly commonly held that they are all simply a mesh of mutually-influenced variants of an even earlier myth that was lost or never recorded in its "original" form.
I don't know how accurate that is but they do share similarities and given the relative cultural influence of Babylon I wouldn't doubt some influence was there.