Since the 18th century, scholars have come up with a number of theories to explain why Genesis repeats many of its stories, why most of the patriarchs have 2 different names, and why God Himself is referred to variously as LORD, God, or LORD God.
One such theory, which I find compelling, is called the Kenite Hypothesis. The Kenite hypothesis notes that Moses' father-in-law was a priest from the tribe of Kenites, and that the Kenites clans are listed as scribes in the Bible. Based on those two things, it makes the hypothesis that Moses inherited a bunch of scrolls from his father-in-law.
Since the Kenites are descendants of Esau, much of their history duplicates Israel's, and so we end up with the same stories told twice, and slightly different names because of a divergence in languages.
It's probably worth noting that Moses probably didn't write Genesis, so much as he curated a collection of scrolls which he passed down to the Levites. At some point, someone decided to put everything in one scroll, and when they did they set them in chronological order. The chronological order sometimes makes things a little weird, as each original scroll doesn't always naturally connect to one that comes before/after it chronologically.