2 accounts of this passage
Matthew 2:19–23
19After Herod died, an angel of the Lord appeared in a dream to Joseph in Egypt 20saying, “Get up, take the young child and his mother, and go into the land of Israel, because those who sought the young child’s life are dead.” 21So Joseph got up, took the child and his mother, and returned to the land of Israel. 22But when he learned that Archelaus was ruling over Judea in place of his father Herod, he was afraid to settle there. Warned by God in a dream, he headed instead to the region of Galilee, 23where he settled in a town called Nazareth. This fulfilled what the prophets had said: "He will be called a Nazarene."