Sarah (then called Sarai) gives Hagar to Abraham (then called Abram) in chapter 16 of Genesis. The promise that Sarah herself will have a son comes later, in chapter 18 (Isaac’s birth is reported in chapter 21).
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.