The Greek word translated as "that it might be fulfilled" in Matthew 1:22 is "pleroo" (G4137) and is defined by Thayer as "to make full, to fill up, i.e. to fill to the full".
A better translation of verses 22-23 would be:
Now all this was done, that it might be made full which was spoken
of the Lord by the prophet, saying, Behold, a virgin shall be with
child, and shall bring forth a son, and they shall call his name
Emmanuel, which being interpreted is, God with us. (Matthew 1:22-23
KJV emphasis and revision mine)
The portion of verse 23 that says, "which being interpreted is, God with us" is not part of Isaiah's words. These words are that of the author of Matthew.
The words of Isaiah pertained to a sign given to the house of David in King Ahaz' day to demonstrate to him that God was still with them. He had feared that his throne, the throne of David, was going to be overthrown by a conspiracy of men (the king of Israel conspiring with the king of Aram), but the LORD (YHVH) said what was being plotted against the house of David was not going to come to pass.
And it came to pass in the days of Ahaz the son of Jotham, the son of
Uzziah, king of Judah, that Rezin the king of Syria, and Pekah the son
of Remaliah, king of Israel, went up toward Jerusalem to war against
it, but could not prevail against it. And it was told the house of
David, saying, Syria is confederate with Ephraim. And his heart was
moved, and the heart of his people, as the trees of the wood are moved
with the wind.
Then said the LORD unto Isaiah, Go forth now to meet
Ahaz, thou, and Shearjashub thy son, at the end of the conduit of the
upper pool in the highway of the fuller's field; And say unto him,
Take heed, and be quiet; fear not, neither be fainthearted for the two
tails of these smoking firebrands, for the fierce anger of Rezin with
Syria, and of the son of Remaliah. Because Syria, Ephraim, and the son
of Remaliah, have taken evil counsel against thee, saying, Let us go
up against Judah, and vex it, and let us make a breach therein for us,
and set a king in the midst of it, even the son of Tabeal: Thus saith
the Lord GOD, It shall not stand, neither shall it come to pass.
(Isaiah 7:1-7 KJV)
The sign that was given to King Ahaz was not so much about the status of the mother, who was said would be with child and bring forth a son, as it was about the son.
And then, it wasn't so much about who this son would be, as it was about what would take place when this son reached a certain age. YHVH would bring upon his enemies the king of Assyria.
Therefore the Lord himself shall give you a sign; Behold, a virgin
shall conceive, and bear a son, and shall call his name Immanuel.
Butter and honey shall he eat, that he may know to refuse the evil,
and choose the good. For before the child shall know to refuse the
evil, and choose the good, the land that thou abhorrest shall be
forsaken of both her kings. The LORD shall bring upon thee, and upon
thy people, and upon thy father's house, days that have not come, from
the day that Ephraim departed from Judah; even the king of
Assyria. (Isaiah 7:14-17 KJV)
So, to King Ahaz, this sign was just a demonstration that when the "almah" in Hebrew (or "parthenos" in Greek) came to be with child and brought forth a son, that son was to be called "Emmanuel", that it was a signal that God was with them. He wasn't saying to literally name the child "Emmanuel".
This is made evident in Isaiah 8 when the prophetess came to be with child and brought forth a son, and he was named something else. But given the verses that follow, it is clear that this is the signal that was being referenced in the previous chapter.
And I went unto the prophetess; and she conceived, and bare a son.
Then said the LORD to me, Call his name Mahershalalhashbaz. For before
the child shall have knowledge to cry, My father, and my mother, the
riches of Damascus and the spoil of Samaria shall be taken away before
the king of Assyria.
The LORD spake also unto me again, saying,
Forasmuch as this people refuseth the waters of Shiloah that go
softly, and rejoice in Rezin and Remaliah's son; Now therefore,
behold, the Lord bringeth up upon them the waters of the river, strong
and many, even the king of Assyria, and all his glory: and he shall
come up over all his channels, and go over all his banks: And he shall
pass through Judah; he shall overflow and go over, he shall reach even
to the neck; and the stretching out of his wings shall fill the
breadth of thy land, O Immanuel.
Associate yourselves, O ye people,
and ye shall be broken in pieces; and give ear, all ye of far
countries: gird yourselves, and ye shall be broken in pieces; gird
yourselves, and ye shall be broken in pieces. Take counsel together,
and it shall come to nought; speak the word, and it shall not stand:
for God is with us. (Isaiah 8:3-10 KJV)
Now the author of Matthew, after laying out a physical genealogy of Jesus, who is called "Christ" (or the Anointed), being the son of David, son of Abraham, by way of Joseph in a very specific way, relays a scene with Joseph, the husband of Mary, who is found to be with child, and that child is the Christ.
The genealogy is presented through a specified framework of three distinct legs: from Abraham to David, specifically identified as "the king"; from David to the carrying away to Babylon, which marked the end of the continuous Davidic dynasty; and from the carrying away to Babylon to the Christ, as summed up in Matthew 1:17.
In that genealogy five mothers are mentioned. Four of those mothers are notable in that they were all known by other men prior to the men for whom they bore children. The fifth mother is identified as being the wife of Joseph, having been betrothed to him before they came together, suggesting she was not known by another man prior to him.
There are three generations of kings that are omitted in the genealogy, one of which is Joash, which was an infant when his father, Ahaziah, who had been reigning on the throne of David had been killed. Upon the death of that king, that king's mother, Queen Athaliah, killed off all the heirs to David's throne (except for Joash, because the child was hidden from her at the time to prevent his demise), and she reigned as queen for six years (until she was ousted, and then Joash was made king).
And when Athaliah the mother of Ahaziah saw that her son was dead, she
arose and destroyed all the seed royal. But Jehosheba, the daughter of
king Joram, sister of Ahaziah, took Joash the son of Ahaziah, and
stole him from among the king's sons which were slain; and they hid
him, even him and his nurse, in the bedchamber from Athaliah, so that
he was not slain. And he was with her hid in the house of the LORD six
years. And Athaliah did reign over the land. (2 Kings 11:1-3 KJV)
Now the episode in which the author of Matthew shares during the pregnancy of Mary, involves Joseph, the husband of Mary, being righteous and unwilling to make a show/example of his wife who was pregnant with the heir to David's throne. He had minded to send her away secretly. But a messenger in a dream reassured him to keep her with him, saying that she would bring forth a son, and he was to name the child "Jesus" (or "Yeshua" in Hebrew, which means "YHVH is Salvation") for he would save his people from their sins.
The author evidently saw all this as making full the words spoken of the prophet Isaiah, given that Mary having been a virgin/young woman, who was with child and was expected to bring forth a son, and that her son would act as a saviour. He must have seen this as a demonstration that God was still with the house of David. (Emmanuel)