Perhaps you heard of a Catholic Priest who resigned because he performed thousands of baptism that were judged to be invalid. https://www.foxnews.com/us/pastor-incorrectly-performed-thousands-baptisms-changing-1-word-invalid
What made the baptisms invalid was the use of one word, according to bishop pf the Phoenix Diocese. The ramifications of this are significant within the Catholic Church.
Fortunately, for those who love the Lord and want to understand and obey His will, one can always turn to the pages of the New Testament, something the Catholic Church years ago turned away from (their denials notwithstanding).
For instance, in Matthew 28:18-20, the Lord commissioned His apostles to go into the world and preach the gospel message of salvation. Those who believe and are baptized will be saved (Mark 16:15-16); those who do not believe will not be saved. Thus, we see, a prerequisite to baptism is for one to believe, that is, he/she must understand the message preached and have a willingness to repent (change of mind), trusting in the Lord. With regard to infants (toddlers), the Catholic Church does not teach this, and even if they did, it would be impossible for an infant, toddler, a young child to know and understand what the Lord calls upon them to understand and do.
Without this, there is no salvation (cf. Luke 9:57-62).
Secondly, baptism in water (immersion, not sprinkling or pouring of water) is not a matter of a formula spoken, but a penitent heart obeying the Lord’s will, understanding fully what he or she is called on the do, which is to be identified with the Lord Jesus Christ.
Or do you not know that as many as were baptized into Christ Jesus were baptized into his death? Therefore we have been buried with him through baptism into death, in order that just as Christ was raised from the dead through the glory of the Father, so we too may live a new life. For if we have become united with him in the likeness of his death, we will certainly also be united in the likeness of his resurrection. We know that our old man was crucified with him so that the body of sin would no longer dominate us, so that we would no longer be enslaved to sin. (For someone who has died has been freed from sin.) (Romans 6:3-7, NET)
What makes a baptism invalid? Not the use of one word or many, but an invalid baptism results if one does not obey in accordance with the Lord’s words in the New Testament.
Baptism is (1) for those who believe from the heart, (2) to receive forgiveness, (3) identification with Christ, (4) to be added to His body, the church, (5) to be saved.
Don’t take my word for it, open your New Testament and see what it says.
(1) Romans 6:16-18, 3-7
(2) Acts 2:28; 22:16
(3) Galatians 3:26-27; Romans 6:3-7
(4) Acts 2:47; Galatians 3:26-27; Ephesians 1:22-23; Colossians 2:12
(5) 1 Peter 3:21