When Jesus entered the world there was apparently a cat and mouse game going on between the friends of God who were waiting expectantly for Messiah to come, and the enemies of God who wanted to eliminate Him.
The magi were friends of God who were sincerely searching for Him and came to King Herod, hoping he could help them:
Matthew 2:1-3 Now after Jesus was born in Bethlehem of Judea in the days of Herod the king, behold, wise men from the East came to Jerusalem, saying, "Where is He who has been born King of the Jews? For we have seen His star in the East and have come to worship Him." When Herod the king heard this, he was troubled, and all Jerusalem with him.
Herod was an enemy of God and asked the magi to return when they found this King so he could go and worship him also. In reality, the murderous Herod would later send a death squad on a rampage in hopes of killing Messiah, who had already escaped to Egypt with His parents.
Jesus was incarnate in the uterus of Mary for nine months before He was born. It is wonderfully poignant that the Lord chose to hide Jesus from those who would do Him harm in the single most unlikely place on earth- the womb of a virgin!