Where did Cain get his wife?
The Bible does not name Cain's wife, but it says Adam and Eve had other sons and daughters, so she was most likely one of Cain's sisters or nieces. In the first generations of the human race there was no one else to marry.
The question looks like a trap. Genesis tells us that Adam and Eve had two sons, and one killed the other. Then Cain suddenly has a wife. Where did she come from? The text is short, but it gives enough to answer.
The text simply mentions her
After Cain leaves the presence of the Lord, the story moves on quickly.
And Cain knew his wife; and she conceived, and bore Enoch: and he built a city, and called the name of the city, after the name of his son, Enoch.
Gen 4:17 · King James Version (1769)
The New Geneva Study Bible points out that the Bible does not say who she was; it only states the fact. That is typical of Genesis. As Jamieson, Fausset and Brown note, this is a very brief history that skips many people and does not stop to explain every marriage.
Still, the book does not leave us entirely without a clue. Genesis tells us that Adam and Eve’s family was much bigger than the two sons we meet in chapter 4.
And the days of Adam after he had begotten Seth were eight hundred years: and he begot sons and daughters:
Gen 5:4 · King James Version (1769)
John MacArthur concludes from this verse that Cain’s wife was evidently one of the later daughters of Adam. Keil and Delitzsch read the text the same way: it takes for granted that she was a daughter of Adam and so a sister of Cain.
Time had passed
The story reads fast, but a lot of time lies between its lines. Albert Barnes notes that Abel already kept flocks, that Cain feared meeting people who would kill him (Genesis 4:14), and that Cain now had a wife and a growing family. All this suggests that a considerable time had passed since the fall.
Keil and Delitzsch add that centuries may have gone by before Cain built his city, and that the Hebrew word need mean no more than a fortified settlement. Adam and Eve had many children, and those children had children. The people Cain feared and the wife he married are both easy to understand in a family that was already large.