Exodus 13:15

15 When Pharaoh stubbornly refused to let us go, the LORD killed the firstborn of both people and animals in Egypt. This is why I sacrifice to the LORD the first male offspring of every womb and redeem each of my firstborn sons.’

Read Exodus 13:15 Using Other Translations

And it came to pass, when Pharaoh would hardly let us go, that the LORD slew all the firstborn in the land of Egypt, both the firstborn of man, and the firstborn of beast: therefore I sacrifice to the LORD all that openeth the matrix, being males; but all the firstborn of my children I redeem.
For when Pharaoh stubbornly refused to let us go, the LORD killed all the firstborn in the land of Egypt, both the firstborn of man and the firstborn of animals. Therefore I sacrifice to the LORD all the males that first open the womb, but all the firstborn of my sons I redeem.'
Pharaoh stubbornly refused to let us go, so the LORD killed all the firstborn males throughout the land of Egypt, both people and animals. That is why I now sacrifice all the firstborn males to the LORD —except that the firstborn sons are always bought back.’

What does Exodus 13:15 mean?

John Gill's Exposition of the Bible
Exodus 13:15

And it came to pass, when Pharaoh would hardly let us go
Showed great reluctance to it, and with difficulty was prevailed upon to dismiss them: that the Lord slew all the firstborn in the land of Egypt, both the
firstborn of men, and the firstborn of beast:
which he did in one night, making use of a destroying angel or angels for that purpose: therefore I sacrifice to the Lord all that openeth thee matrix, being
males;
that is, the firstborn of all clean creatures, as oxen, sheep, and goats: but all the firstborn of my children I redeem;
by paying five shekels apiece to the priest for them, as before observed; and this law continues to be observed with the Jews; the manner of which, as related by Leo Modena F9, is as follows,

``Thirty days being expired after the birth of the child, they call a priest to them; that is to say, one that is descended of the stock of Aaron, whom the father of the child pleaseth; and so, many people being gathered together at the time appointed, the father of the child bringeth before the priest, in a bowl or basin, a good quantity of gold and silver, and then they give him the child into his arms; the priest then calling the mother of it before him, saith unto her, mistress, is this your son? she answereth, yes; then, replies he, have you never had any child before, either male or female, or have miscarried anyone? she saith unto him, no; then doth the priest say, this child is mine, as being the firstborn; then turning himself toward the father, he asketh him, whether he will redeem it or not? who answereth him, saying, see, here is gold and silver, take your own price; then saith the priest unto him, you will redeem it then? the father answereth, I will redeem it; it shall be so then, saith the priest, this child is mine as being the firstborn, as it is written, ( Numbers 18:16 ) . I therefore take this in exchange and so he takes the sum of two French crowns, or thereabout, as he thinks good, and then delivers the child to his father and mother, and this day they make a feasting day.''
This custom was used in Christ's time, and was observed with respect to him, ( Luke 2:27 ) .
FOOTNOTES:

F9 History of the Jews, par. 4. c. 9. sect. 2.
California - Do Not Sell My Personal Information  California - CCPA Notice