“When they heard this, they were baptized in the name of the Lord Jesus.”
Paul found some disciples in Ephesus who had received only the baptism of John. Perhaps they had been taught by Apollos, whose information was outdated. Paul taught them correctly and they responded appropriately.
Baptism is a once-in-a-lifetime act of obedience. Wrong ritual that does not put one in Christ doesn’t count. A person needs to be “baptized in the name of the Lord Jesus.” The proper response to hearing the truth is acting upon it.