Since the time of moses, baptism were already stated as what written in:
1 Corinthians 10:2
King James Version (KJV)
And were all baptized unto Moses in the cloud and in the sea;
This was when Moses divided the sea for the Israelites to crossed under it.
It was in the time of Christianity when baptism becomes a doctrine.
Please @aekraj watch always the videos of.bro eli for you to learn and discover truths in the Bible