You’re right baptism can’t prevent a sin from happening. Vaccinations don’t prevent disease from happening, either.
Both of my kids were vaccinated for Chicken Pox… and they still GOT Chicken Pox! Did the vaccine work? Or did it fail?
Baptism does a little bit more then just washes away sins and initiates us into the Church:
[quote=CCC]1279 The fruit of Baptism, or baptismal grace, is a rich reality that includes forgiveness of original sin and all personal sins, birth into the new life by which man becomes an adoptive son of the Father, a member of Christ and a temple of the Holy Spirit. By this very fact the person baptized is incorporated into the Church, the Body of Christ, and made a sharer in the priesthood of Christ.
1280 Baptism imprints on the soul an indelible spiritual sign, the character, which consecrates the baptized person for Christian worship. Because of the character Baptism cannot be repeated (cf. DS 1609 and DS 1624).
What is Original Sin? Original Sin is the First Sin by Adam and Eve. Their Sin was the sin of disobedience.
Original Sin is transmitted from generation to generation. What is transmitted to each generation is NOT the personal sin that Adam and Eve did (i.e. disobedience). This is because Original Sin is not an actual sin such as disobedience.
So what is passed down?
The natural inclination to sin
Therefore Original Sin is the natural inclination to sin. That is what is passed down generation to generation.
Baptism totally washes away Original Sin so that it is no longer on our soul. It also totally washes away any actual sins on a person soul (which is important to note for those that are baptize later in life example: Adults)
However, by our baptism we also receive God’s Graces and become a temple of the Holy Spirit.
Being a temple of the Holy Spirit means that the Holy Spirit is with us and is helping us fight of any sins that come our way…. Similar to the antibodies that are left behind by the vacciantions that we receive as babies.
They are there to help us fight the fight for whatever disease that comes our way. Just like the Holy Spirit is in us helping us fight what ever sins that comes our way.
Also this does not mean that Holy Spirit only dwells in those that have been baptized by water. That is where the baptism by blood and baptism by desire come in… The Holy Spirit is clearly at work there too!!!
We can help the Holy Spirit fight the fight by living a healthy life style.
We live a healthy life style by avoiding the Seven Deadly Sins and using the 7 Virtues.