This happened when Christ Jesus was about 2 years old. The star led them first to King Harrod who wanted them to report back to him to kill Christ Jesus, so the star was clearly not from God Almighty, but rather from God's enemy satan. Note that Jehovah God Almighty appeared to Joseph in a dream after their visit, & Jehovah told Joseph to take Mary & Jesus to Egypt, & Jehovah did not tell him to return with them until after king Harrod's death. ----- Star not from God, but satanic.
Matthew 2 : 9-11 9 When they heard the king, they departed; and behold, the star which they had seen in the East went before them, till it came and stood over where the young Child was. 10 When they saw the star, they rejoiced with exceedingly great joy. 11 And when they had come into the house, they saw the young Child with Mary His mother, and fell down and worshiped Him. And when they had opened their treasures, they presented gifts to Him: gold, frankincense, and myrrh.
Surrounded by hundreds and hundreds of twinkling stars in a beautiful night sky, a large Christmas Nativity star shines down upon the silhouetted town of Bethlehem with white rays of light and sparkling particles.