In Acts chapter 10 Peter is sent to Cornelius’ house to preach the gospel. As he is preaching, and prior to their baptism, the Holy Spirit fell on them and they began speaking in tounges. If a person is born again when he is baptised how could the Holy Spirit have fell on them prior to thier baptism?
God does whatever He wills in Heaven and on earth.
Part of the reason, as you read the chapter, for the manifestation of gifts prior to Baptism is to reveal to Peter that God’s salvation is extended to the Gentiles and not simply limited to the Jews. Notice also that it is before Peter visits Cornelius that he has his dream while napping on the roof, the dream with foods considered unclean under Mosaic Law.
As 21st century Christians, we recognize that Christ paid for our salvation on Calvary. Yet even before his death on the cross, as He healed people how many times He said. "Your faith has saved you."
Cornelius was rewarded for his righteousness. He had faith and was open to the gifts of the Holy Spirit.