In Genesis 15, here is Abram’s converstion with God:
2 But Abram said, Sovereign Lord, what can you give me since I remain childless and the one who will inherit, my estate is Eliezer of Damascus? 3 And Abram said, You have given me no children; so a servant in my household will be my heir.
4 Then the word of the Lord came to him: This man will not be your heir, but a son who is your own flesh and blood will be your heir. 5 He took him outside and said, Look up at the sky and count the starsif indeed you can count them. Then he said to him, So shall your offspring[d] be.
Either Abraham did not tell his wife about his conversation with God, or even if he did, Sarai ( Sarah ) might have understood “your flesh and blood” NOT to include her.
Be that as it may, it was still a case of surrogate motherhood.
Something similar happens with the wives of Jacob. When Rachel is sterile, she gives her maid to Jacob and the maid produces two sons, Dan and Nephthali. Leah had had 4 sons already but gives her maid to Jacob and he has two more sons by her, Gad and Asher. Then Leah has two more sons and a daughter. Finally Rachel has two sons, Joseph and Benjamin.