Here’s what St. Thomas says
Objection 2. Further, Baptism seems to have been instituted principally as a remedy for original sin. Now, since a man who is baptized is without original sin, it seems that he cannot transmit it to his children. Therefore it seems that the children of those who have been baptized, should not themselves be baptized.
Reply to Objection 2. As we have stated in I-II:81:3 ad 2, those who are baptized are renewed in spirit by Baptism, while their body remains subject to the oldness of sin, according to Romans 8:10: “The body, indeed, is dead because of sin, but the spirit liveth because of justification.” Wherefore Augustine (Contra Julian. vi) proves that “not everything that is in man is baptized.” Now it is manifest that in carnal generation man does not beget in respect of his soul, but in respect of his body. Consequently the children of those who are baptized are born with original sin; wherefore they need to be baptized.