Luke 2:21-24
"And when eight days were accomplished for the circumcising of the child, his name was called JESUS, which was so named of the angel before he was conceived in the womb. And when the days of her purification according to the law of Moses were accomplished, they brought him to Jerusalem, to present him to the Lord; (As it is written in the law of the Lord, Every male that openeth the womb shall be called holy to the Lord)
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."
This is what it says "in the law of the Lord":
Leviticus 12:1-8
"And the LORD spake unto Moses, saying, Speak unto the children of Israel, saying, If a woman have conceived seed, and born a man child: then she shall be unclean seven days; according to the days of the separation for her infirmity shall she be unclean. And in the eighth day the flesh of his foreskin shall be circumcised. And she shall then continue in the blood of her purifying three and thirty days; she shall touch no hallowed thing, nor come into the sanctuary, until the days of her purifying be fulfilled. But if she bear a maid child, then she shall be unclean two weeks, as in her separation: and she shall continue in the blood of her purifying threescore and six days. And when the days of her purifying are fulfilled, for a son, or for a daughter, she shall bring a lamb of the first year for a burnt offering, and a young pigeon, or a turtledove, for a sin offering, unto the door of the tabernacle of the congregation, unto the priest: Who shall offer it before the LORD, and make an atonement for her; and she shall be cleansed from the issue of her blood. This is the law for her that hath born a male or a female.
And if she be not able to bring a lamb,
then she shall bring two turtles, or two young pigeons; the one for the burnt offering, and the other for a sin offering: and the priest shall make an atonement for her, and she shall be clean."
Most Bible versions read "and if she cannot afford a lamb" in verse 8:
https://biblehub.com/leviticus/12-8.htm
Seeing how Mary did not bring a lamb, but brought two turtledoves or two pigeons instead, this seems to indicate that she was not wealthy at that time.