In Mark 16:15 we read: ...he said unto them, Go ye into all the world, and preach the gospel to every creature. 16 He that believeth and is baptized shall be saved; but he that believeth not shall be damned (condemned).
From this we see that the person being baptised must be old enough to believe the gospel.
In order to believe the gospel a person has to be old enough to understand it.
The gospel consists of ‘the things concerning the kingdom of God and the name of Jesus Christ’.
Acts 8:12... when they believed Philip preaching the things concerning the kingdom of God, and the name of Jesus Christ, they were baptized, both men and women.
It is what the person understands and believes that makes baptism valid.
Acts 8:36 And as they went on their way, they came unto a certain water: and the eunuch said, See, here is water; what doth hinder me to be baptized? 37 And Philip said, If thou believest with all thine heart, thou mayest.
They need to be old enough to recognise what sin is (the disobeying of God’s commandments).
Romans 3:23 For all have sinned, and come short of the glory of God;
They need to be old enough to understand that the life they live before baptism according to their own desires has to be repented of (repented of means completely turned around).
Acts 2:38 ...Peter said unto them, Repent, and be baptized every one of you in the name of Jesus Christ for the remission of sins...
They need to be old enough to understand the life that God requires them to live after baptism.
Romans 6:3 Know ye not, that so many of us as were baptized into Jesus Christ were baptized into his death? 4 Therefore we are buried with him by baptism into death: that like as Christ was raised up from the dead by the glory of the Father, even so we also should walk in newness of life.
Some people mature at an earlier age than others.
No age restriction appears in the Bible.
I hope you have found this helpful.
May God bless you,
Glenn