Read Matthew 2:15 Using Other Translations
And was there until the death of Herod: that it might be fulfilled which was spoken of the Lord by the prophet, saying, Out of Egypt have I called my son.
and remained there until the death of Herod. This was to fulfill what the Lord had spoken by the prophet, "Out of Egypt I called my son."
and they stayed there until Herod’s death. This fulfilled what the Lord had spoken through the prophet: “I called my Son out of Egypt.”