Luke 9-14: An Angel proclaimes the birth of the Messiah.
Luke 15-18: Everyone knows that the Angel proclaimed the birth to the shepherds and that Messiah would be found wrapped in swaddling cloths and lying in a manger.
Luke 19: Mary treasured these things and pondered them in her heart.
Luke 20: The shepherds went back, glorifying and praising God for all that they had heard and seen, just as had been told them.
Luke 25-38: And there was a man in Jerusalem whose name was Simeon; and this man was righteous and devout, looking for the consolation of Israel; and the Holy Spirit was upon him. 26. And it had been revealed to him by the Holy Spirit that he would not see death before he had seen the Lord’s Christ. 27. And he came in the Spirit into the temple; and when the parents brought in the child Jesus, to carry out for Him the custom of the Law, 28. then he took Him into his arms, and blessed God, and said, 29. “Now Lord, You are releasing Your bond-servant to depart in peace, According to Your word; 30. For my eyes have seen Your salvation, 31. Which You have prepared in the presence of all peoples, 32. A Light of revelation to the Gentiles, And the glory of Your people Israel.” 33. And His father and mother were amazed at the things which were being said about Him. 34. And Simeon blessed them and said to Mary His mother, “Behold, this Child is appointed for the fall and rise of many in Israel, and for a sign to be opposed— 35. and a sword will pierce even your own soul—to the end that thoughts from many hearts may be revealed.” 36. And there was a prophetess, Anna the daughter of Phanuel, of the tribe of Asher. She was advanced in years and had lived with her husband seven years after her marriage, 37. and then as a widow to the age of eighty-four. She never left the temple, serving night and day with fastings and prayers. 38. At that very [q]moment she came up and began giving thanks to God, and continued to speak of Him to all those who were looking for the redemption of Jerusalem.
Yeshua's birth was broadcast and praised to the public by angels. Angels told the shepherds exactly where they would find Yeshua. After all this, Mary "pondered all that was said in her heart".
Matthew 2: Now after Jesus was born in Bethlehem of Judea in the days of Herod the king, magi from the east arrived in Jerusalem, saying, 2. “Where is He who has been born King of the Jews? For we saw His star in the east and have come to worship Him.” 3. When Herod the king heard this, he was troubled, and all Jerusalem with him. 4. Gathering together all the chief priests and scribes of the people, he inquired of them where the Messiah was to be born. 5. They said to him, “In Bethlehem of Judea; for this is what has been written by the prophet..." Herod and the "priests" sent the Wise men to Bethlehem. They didn't know where Messiah was. The wise men were tasked with "searching carefully for Him". Matthew 2:8 And he sent them to Bethlehem and said, “Go and search carefully for the Child; and when you have found Him, report to me, so that I too may come and worship Him.”
This was a command from men.
Matthew 2:9 After hearing the king, they went their way; and the star, which they had seen in the east, went on before them until it came and stood over the place where the Child was. 10. When they saw the star, they rejoiced exceedingly with great joy.
The only rejoicing was from the wise men when they saw their "star". (They rejoiced exceedingly, BEFORE they even entered the house/Inn, over seeing the “star”.)
Matthew 2:11 After coming into the house they saw the Child with Mary His mother; and they fell to the ground and worshiped Him. Then, opening their treasures, they presented to Him gifts of gold, frankincense, and myrrh.
When they find Yeshua, there is no mention at all of Mary "pondering" what they said or even acknowledging their visit. In her eyes it may have been "Greeks bearing gifts". Mathew 2 could have only come to Matthew by way of Mary, the only eyewitness left from that encounter that well knew Mathew. The wise men told her about the dream and they assumed that it was God, but was probably one of Gods messengers, an Angel. Or: God warned them by way of an Angel. Either one works.
The Matthew 2 account has none of the rejoicing that we see in Luke 2, just the Wise Men rejoice "exceedingly". This visit by the Magi sets up the first New Testament account of an attempt to kill Messiah and Mary did not "ponder" what they said/did, in her heart. (The Wise Men probably did not even know that they were Pawns of the “Powers of the air, Satan.)