Some argue that the Bible cannot be true because the Bible says that Cain had a wife, but there would only have been one family, the family of Adam and Eve, so where would Cain have found a wife? The answer is simple, and there is absolutely no problem with the biblical text.
Cain knew his wife, and she conceived and bore Enoch. When he built a city, he called the name of the city after the name of his son, Enoch. Genesis 4:17
The argument is that since everyone came from Adam and Eve, Cain could not have found a wife.
Cain married one of his sisters. Since Adam and Eve were born perfect, it is very reasonable to believe that their genes were pure in such a way that incest would not have been a problem during this early time period.
The Bible tells us that Adam and Eve had other sons and daughters besides Cain and Abel.
The days of Adam after he fathered Seth were 800 years; and he had other sons and daughters. Genesis 5:4
The prohibition against incest does not occur until later in the Bible, during a time in which incest would have resulted in problems.
None of you shall approach any one of his close relatives to uncover nakedness. I am the Lord. Genesis 4:17
So, there is absolutely no problem or contradiction with Genesis 4:17.
To read more answers to alleged and apparent contradictions in the Bible, see “Contradictions” in the Bible Answered.
These books are also excellent resources: