When Jesus was “presented” in Jerusalem by Mary and Joseph, the sacrifice made was “a pair of turtledoves or two young pigeons”:
Luke 2: 22 When the days of their purification according to the law of Moses were fulfilled, they brought him up to Jerusalem, to present him to the Lord 23 (as it is written in the law of the Lord, “Every male who opens the womb shall be called holy to the Lord”), 24 and to offer a sacrifice according to that which is said in the law of the Lord, “A pair of turtledoves, or two young pigeons.”
But in Matthew when the Magi found Jesus:
Matthew 2: 11 They came into the house and saw the young child with Mary, his mother, and they fell down and worshiped him. Opening their treasures, they offered to him gifts: gold, frankincense, and myrrh.
Why such an offering when they were given such gifts?