We don’t know who Cain married, this is not mentioned in the Bible.
However we do know of the genealogy of Jesus in Matthew 1, and can trace this to be historically correct. So in general terms we accept other genealogies in the Bible to be true, even if some of the details are left out or even of there are some things that we do not understand.