After Jesus was born in Bethlehem in the territory of Judea during the rule of King Herod, magi came from the east to Jerusalem.
References for Matthew 2:1
They asked, "Where is the newborn king of the Jews? We've seen his star in the east, and we've come to honor him."
When King Herod heard this, he was troubled, and everyone in Jerusalem was troubled with him.
He gathered all the chief priests and the legal experts and asked them where the Christ was to be born.
They said, "In Bethlehem of Judea, for this is what the prophet wrote:
You, Bethlehem, land of Judah, by no means are you least among the rulers of Judah, because from you will come one who governs, who will shepherd my people Israel."
References for Matthew 2:6
Then Herod secretly called for the magi and found out from them the time when the star had first appeared.
He sent them to Bethlehem, saying, "Go and search carefully for the child. When you've found him, report to me so that I too may go and honor him."
When they heard the king, they went; and look, the star they had seen in the east went ahead of them until it stood over the place where the child was.
When they saw the star, they were filled with joy.
They entered the house and saw the child with Mary his mother. Falling to their knees, they honored him. Then they opened their treasure chests and presented him with gifts of gold, frankincense, and myrrh.
Because they were warned in a dream not to return to Herod, they went back to their own country by another route.