Baptism confers the grace of forgiveness of all sin both eternal and temporal. Jesus told Nicodemas (John 3:3-8) that he must be born again of water and the spirit. So through baptism we are born again unto eternal life. We have examples in Sacred Scripture of adults being baptized and whole households (presumably including children) receiving baptism.. There is nothing in Scripture ithat prohibits infant baptism or commands baptism only after the age of reason.
Catholics believe that baptism actually confers the grace of initial salvation. Therefore we give our children this advantage. Many Protestants deny this and for them baptism is only a public witness of their faith in obedience to Christ. So they see no need to baptize infants. But, Presbyterians and Anglicans for example do baptize infants.
I Pet. 3:21
“…baptism now saves you”
Baptism in the New Covenant corresponds to infant circumcision for the Old Covenant.
Baptism is not the only requirement for salvation once one reaches the age of reason and begins to be culpable for sin. Then we have contrition, repentance and confession as a remedy for sin and Eucharist in order to obtain eternal life.
Jn 6:53 So Jesus said again, “I tell you the truth, unless you eat the flesh of the Son of Man and drink his blood, you cannot have eternal life within you. 54 But anyone who eats my flesh and drinks my blood has eternal life, and I will raise that person at the last day.