Cain was Adam's firstborn...
And Adam knew Eve his wife; and she conceived, and bare Cain, and said, I have gotten a man from the LORD. Genesis 4:1
It's also a repeated theme throughout the bible. And it does start with Cain and Abel, one was faithful, one was not.
As with Abraham, Isaac was the promised son, yet Ishmael still was a son of Abraham.
Galatians 4:22
For it is written, that Abraham had two sons, the one by a bondmaid, the other by a freewoman.
Galatians 4:23 But he who was of the bondwoman was born after the flesh; but he of the freewoman was by promise.
That is still the case in the world today, as it has been since the beginning.
Galatians 4:28 Now we, brethren, as Isaac was, are the children of promise.
Galatians 4:29 But as then he that was born after the flesh persecuted him that was born after the Spirit, even so it is now.
Galatians 4:30 Nevertheless what saith the scripture? Cast out the bondwoman and her son: for the son of the bondwoman shall not be heir with the son of the freewoman.
The same picture throughout the bible, from the very beginning.
Isaac had two sons, Jacob and Esau,
Jacob was named "Israel" by the Lord.
Jacob/Israel had twelve sons.
And Joseph went into bondage in Israel. God set's them free from that bondage.
Just like today...
And even though God brought the people out of (Egypt/bondage/sin) still there were commandments given.
Genesis 16:1 Now Sarai Abram's wife bare him no children: and she had an handmaid, an Egyptian, whose name was Hagar.
Exodus 13:3 And Moses said unto the people, Remember this day, in which ye came out from Egypt, out of the house of bondage; for by strength of hand the LORD brought you out from this place: there shall no leavened bread be eaten.
Exodus 16:4 Then said the LORD unto Moses, Behold, I will rain bread from heaven for you; and the people shall go out and gather a certain rate every day, that I may prove them, whether they will walk in my law, or no.
Exodus 20:20 And Moses said unto the people, Fear not: for God is come to prove you, and that his fear may be before your faces, that ye sin not.
Deuteronomy 8:2 And thou shalt remember all the way which the LORD thy God led thee these forty years in the wilderness, to humble thee, and to prove thee, to know what was in thine heart, whether thou wouldest keep his commandments, or no.
Deuteronomy 8:3 And he humbled thee, and suffered thee to hunger, and fed thee with manna, which thou knewest not, neither did thy fathers know; that he might make thee know that man doth not live by bread only, but by every word that proceedeth out of the mouth of the LORD doth man live.
Matthew 4:4 But he answered and said, It is written, Man shall not live by bread alone, but by every word that proceedeth out of the mouth of God.
2 Corinthians 13:5 Examine yourselves, whether ye be in the faith; prove your own selves. Know ye not your own selves, how that Jesus Christ is in you, except ye be reprobates?
1 Thessalonians 5:21 Prove all things; hold fast that which is good.
1 Thessalonians 5:22 Abstain from all appearance of evil.
1 Thessalonians 5:23 And the very God of peace sanctify you wholly; and I pray God your whole spirit and soul and body be preserved blameless unto the coming of our Lord Jesus Christ.
1 Thessalonians 5:24 Faithful is he that calleth you, who also will do it.