It does nothing of the sort.
It simply gets the child wet.
The only thing that removes sin is the blood of Jesus. Without the shedding of blood there is NO forgiveness of sins, which is why baptism does not and cannot work. Its the wrong mechanism for removal of sin.
Peter would disagree with you:
18 For Christ also suffered[b] once for sins, the righteous for the unrighteous, that he might bring us to God, being put to death in the flesh but made alive in the spirit, 19 in which[c] he went and proclaimed[d] to the spirits in prison, 20 because[e] they formerly did not obey, when God’s patience waited in the days of Noah, while the ark was being prepared, in which a few, that is, eight persons, were brought safely through water. 21 Baptism, which corresponds to this, now saves you, not as a removal of dirt from the body but as an appeal to God for a good conscience, through the resurrection of Jesus Christ, 22 who has gone into heaven and is at the right hand of God, with angels, authorities, and powers having been subjected to him.
Did you miss this part?
Baptism, which corresponds to this, now saves you, not as a removal of dirt from the body but as an appeal to God for a good conscience, through the resurrection of Jesus Christ,
NOT water baptism.