I have constantly heard people saying that the book of Genesis is a copy of the Epic of Gilgamesh and Sumerian myths. Even in my history textbook for school it says that the seven days of creation from the book of Genesis came from Sumerian myths. When i read the sumerian creation accounts from the seven stone tablets, it seems like there is not to much similarity between them. The flood in the Epic of Gilgamesh is similar to the flood in Genesis in more ways. My question is which one came first? There seems to have obviously been a massive flood if there are many ancient traditions with floods in them. But is it true that the stories in Genesis were passed down orally for many many years, and some people twisted these stories and in turn formed creation stories such as the Epic of Gilgamesh, and Sumerian beliefs about creation?
I didn't find the right solution from the Internet.