Gen 18:9-12 says this:
9 “Where is your wife Sarah?” they asked.
“There, in the tent,” he replied.
10 Then the LORD said, “I will surely return to you at this time next year, and your wife Sarah will have a son!”
Now Sarah was behind him, listening at the entrance to the tent.
11 And Abraham and Sarah were already old and well along in years; Sarah had passed the age of childbearing. 12 So she laughed to
herself, saying, “After I am worn out and my master is old, will I now
have this pleasure?”
The arrangement of people appears to be the LORD and the two angels (Gen 19:1) with their back to the tent talking to Abraham, who was facing the tent.
Notice that the "LORD" in the above translation is actually just the verb "said" in the 3rd person masculine singular, so it should be strictly translated, "And He said". In any case, it is clear that the LORD YHWH is speaking. Thus, the "He" at the beginning of V10 is the same "him" at the end of the same V10.
Thus Sarah was standing, just out of sight in the entrance of tent door behind the LORD.
It is fascinating that while Sarah stood behind the LORD, later in V22 we have the opposite:
And the two men turned away and went toward Sodom, but Abraham
remained standing before the LORD.
It appears that there is a deliberate literary contrast between the action of Sarah and Abraham in this short narrative.