'Heir' in the Bible
But Abram said, “Lord God, what can You give me, since I am childless and the heir of my house is Eliezer of Damascus?”
And Abram said, Behold, to me thou hast given no seed: and, lo, one born in my house is mine heir.
And, behold, the word of the LORD came unto him, saying, This shall not be thine heir; but he that shall come forth out of thine own bowels shall be thine heir.
Wherefore she said unto Abraham, Cast out this bondwoman and her son: for the son of this bondwoman shall not be heir with my son, even with Isaac.
indeed I will greatly bless you, and I will greatly multiply your descendants like the stars of the heavens and like the sand on the seashore; and your seed shall possess the gate of their enemies [as conquerors].
But Onan knew that the offspring wouldn't be his own heir, so whenever he had sexual relations with his brother's wife, he would spill his semen on the ground to avoid fathering offspring for his brother.