Matthew's gospel tells us that the star appeared to the Magi and led them to Jerusalem. Two questions: why were they looking for a star and why not lead them ddirectly to Bethlehem?
1 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, 2 saying, Where is he who has been born king of the Jews? For we saw his star when it rose and have come to worship him.
The magi saw "his star when it rose." They evidently were scholars of the surrounding nations' literature and practitioners of astronomy. In Numbers 24:17 there is reference to a "star" coming out of Jacob and a "scepter" arising from Israel, which is a symbol for a king. The magi calculated that the "star" was the sign of a special ruler to be born in Israel. The star that appeared to them had to be something special, different, and extraordinary. It could not be a heavenly object that could be easily explained. When this star rose, it certainly caught the attention of these wise men. And they followed it, not to Bethlehem, but to Jerusalem.
When the star first appeared is unknown, but Herod schemed to find out (Mt. 2:7). Why? He was calculating the approximate age of this child, assuming that the star arose at or around the time of birth. Thinking the magi took time to prepare for the trip and then figuring out the length of their journey, Herod believed the child to be under 2 years old. Hence, his slaughter of the innocents that caused Rachel to weep for her children (Mt. 2:16-17).
The magi departed Jerusalem after learning that a king was prophesied by Micah to be born in Bethlehem and after meeting secretly with Herod. As they recommenced their journey the star reappeared, causing them to rejoice (Mt. 2:9-10). Notice, however, that the star led them to a house (Mt. 2:11), not a cave or stable. If this were a normal star, it would have perched high over the town of Bethlehem, thereby shining on all the abodes. This star, however, brought the magi to a specific home where they discovered a toddler whose presence caused them to fall down and worship. The star could have led the magi directly to Jesus in Bethlehem, but instead brought them to Jerusalem first. This was God's plan to confirm his Word about Messiah being born in Bethlehem and to use Herod in fulfilling prophesy (Mt. 2:17-18).
The Star of Bethlehem was God's special means of leading wise men from the East to the home of the true King of Israel. They discovered their Savior. May all my readers do likewise!