I always wondered as a kid how Adam and Eve with two sons begat the entire human race.
That’s a different matter and is quite unique - a one-time event in the human race - with Adam and Eve. You’ll notice that with Noah, the human race is squeezed down into just three families ... those three sons and their wives. And with very large families and with their still long lives - the human race grew quite fast, again.
Now with Adam and Eve, they were perfect beings, physically speaking, and you know there wasn’t the kind of genetic damage we have in the human race now. Adam and Eve had lots of sons and daughters (although only a few sons are mentioned by name). So, it was absolutely mandatory that all those sons and daughters marry and have large families. There was no way around that in the beginning.
It was later, that God laid down the commandment against incest ... but we’ll also note in the Bible that it did not apply to cousins - only the very immediate family.
The Bible says that Adam also had other sons and daughters. Genesis 5:4. That leads to another question, though...