And yet Cornelius and all his household were saved and baptised in the Holy Ghost while Peter was still speaking [ ... before he could get on to conditions such as baptism, so many of us perceive]
This is why we affirm positively that salvation or for that matter the baptism of the Holy Spirit does not depend upon water baptism
We never the less believe we should be baptised in water in accordance with the scripture.
The church at the time of Cornelius was in a time of transition...Gentiles were not yet accepted as being able to be members of the body of Christ.
If God had not proven that Gentiles could be saved by giving Cornelius and friends the gift of the Holy Ghost, the circumcision group would have never allowed them to be baptized; or else that would not have recognized their baptisms as valid if Peter had gone ahead with them apart from God first proving that they were saved; by giving them the gift of tongues.
God knew that each one of those whom he gave the gift of tongues would immediately baptized; even as occurred in that story..
In that instance God gave them the remission of sins through baptism in Jesus' Name...while they already had the gift of the Holy Ghost.
In Acts 2:38-39 and context, the people received the Holy Ghost (salvation) even as the result of baptism in Jesus' Name.
I would contend that the instance with Cornelius was an exception to the rule.
I myself received the gift of tongues before I was baptized in Jesus' Name.
Because I had the Holy Spirit, I did not reject baptism in Jesus' Name when it was offered to me...for the promise that was offered to me, while I already had the gift of the Holy Ghost, was remission of sins.
Remission of sins and the gift of the Holy Ghost is absolutely promised to those who will fulfill the condition of the promise in Acts 2:38-39.
That condition is repentance and baptism in the name of Jesus Christ of Nazareth for the remission of sins.
If you have doubts about whether you have one or the other (either the gift of the Holy Ghost or remission of sins), then it is good for you to surrender to baptism in Jesus' Name; so that you can most assuredly receive the promise.