If you will read the story of the wise men's visits to the infant Jesus, recorded in Matthew 2:1-12, carefully, you will see that it says nothing about "three" wise men. It says there are three gifts which included gold, frankinsence and myrrh. Indeed, it may just be citing these as examples of the gifts brought by each of them. They presented [really "offered" as in a religious offering] their gifts to Jesus as representing their belief that he is the "great king", the Messiah of Israel. However, we cannot know for sure how many "Wise Men" or "Magi" there were.
In the Bible gold represents tried faith - see 1 Peter 1:7; frankinsence represents prayer - see Leviticus 2; myrrh is representative of dedication - see Exodus 30:23-31. These gifts indicated that these "wise men" were truly wise and understood as few others did the work that Jesus would perform and the cost it would entail. For example Myrrh is intimately bound up with Jesus' sacrifice on the cross - see Mark 15:23 and John 19:39.
Note that by the time the wise men [however many there were] reached Bethlehem, Jesus and his family were living in a house [Matthew 2:11] and no longer in the stable because some considerable time had passed before their arrival in Bethlehem. Jesus is no longer considered a baby but rather a "young child" [verse 11]. That's why, Herod in his jealous anxiety ordered the murder of all the children in Bethlehem 2 years old and younger. So Jesus may have been about 2 years old by this time.
The gold that the wise men gave the family would have been very providential to sustain them while they lived in Egypt after fleeing there to escape Herod's murderous plot to destroy Jesus.
I hope you have found this helpful.