Jesus said both are necessary.
John 3:5-7
5 Jesus answered, Verily, verily, I say unto thee, Except a man be born of water and of the Spirit, he cannot enter into the kingdom of God.
6 That which is born of the flesh is flesh; and that which is born of the Spirit is spirit.
7 Marvel not that I said unto thee, Ye must be born again.
KJV
John 3:5-7
5 Jesus answered, Verily, verily, I say unto thee, Except a man be born of water and of the Spirit, he cannot enter into the kingdom of God.
6 That which is born of the flesh is flesh; and that which is born of the Spirit is spirit.
7 Marvel not that I said unto thee, Ye must be born again.
KJV
Water baptism is a carryover from part of the Levitical Law.
There are many examples of people in the Old Testament who would wash themselves with water as a final step to being clean. Water baptism was an outward sign of washing, and then you would be clean to God. Baptism in water, and the need to be circumcised passed away with the coming of Pentecost, as did the other Levitical Laws. To be led by the spirit is to not be under the yoke of bondage with the extreme of legalism, seeking the works of the flesh from the old covenant concerning the past Law administration that was written to Israel.
It's clear from the gospels that water baptism had to do with the kingdom, which was ministered by John who was known as the Baptizer, and not a minister for the Church of God. John who was a prophet functioning under the old covenant was appointed by God to prepare and confirm the promises made to Israel. His message was to tell those who lived under the old covenant that the king had come and “the kingdom of heaven is at hand.”
He used water as a sign to baptize those who believed the promised Messiah would be coming in just a matter of months and to illustrate that he would be the Christ, who would baptize them not with material water, but with holy spirit, which is “power from on high.” From the habit of tradition, and only for a short period of time, a small handful of people were baptized with water into the New Testament, but never again afterwards.
In the epistles written just a little bit past the beginning of the New Testament is where we read the only time water baptism is mentioned is to note there is no more need for it, and that we are now to be baptized with holy spirit. And this is why in Acts 2:38, Peter commands “Repent, and be baptized every one of you in the name of Jesus Christ.” In Acts 8:16, Peter and John “baptized in the name of the Lord Jesus.” In Acts 10:48, Peter “commanded them to be baptized in the name of the Lord.” In Romans 6:3, it declares “that so many of us as were baptized into Jesus Christ.”
There is not one exception to this practice where we see water baptism, which belonged to the time period when Christ walked the earth, being used once the Church of God had become established.