In this way what the prophet Jeremiah had said came true:
"A sound is heard in Ramah, 1 the sound of bitter weeping. Rachel is crying for her children; she refuses to be comforted, for they are dead."
References for Matthew 2:18
After Herod died, an angel of the Lord appeared in a dream to Joseph in Egypt
and said, "Get up, take the child and his mother, and go back to the land of Israel, because those who tried to kill the child are dead."
So Joseph got up, took the child and his mother, and went back to Israel.
But when Joseph heard that Archelaus had succeeded his father Herod as king of Judea, he was afraid to go there. He was given more instructions in a dream, so he went to the province of Galilee
and made his home in a town named Nazareth. And so what the prophets had said came true: "He will be called a Nazarene." 2
References for Matthew 2:23
2.23 Mk 1.24; Lk 2.39; Jn 1.45.