Jesus has not lost the power to forgive sins, but He does still have the authority to determine “how” He does it. Jesus said that when He went back to heaven He would send the Holy Spirit to guide the apostles into ALL the truth, John 16:13.
But when He, the Spirit of truth, comes, He will guide you into all the truth; for He will not speak on His own initiative, but whatever He hears, He will speak; and He will disclose to you what is to come.
At the beginning of Acts 2, we see the promised Holy Spirit coming to the apostles. Then beginning in Acts 2:17, we see Peter beginning to preach the gospel message that Jesus said they were to preach, Mark 16:15-16.
And He said to them, “Go into all the world and preach the gospel to all creation. He who has believed and has been baptized shall be saved, but he who has disbelieved shall be condemned.”
Peter by inspiration of the Holy Spirit spoke of the death and resurrection (Acts 2:23-24, 31) and the burial of Jesus is implied in the resurrection. When the listeners heard this they asked what they needed to do (Acts 2:37).
What did Peter tell them, by inspiration of the Holy Spirit? Peter told them that they needed to Repent and be baptized FOR the forgiveness of their sins. Acts 2:38.
And Peter said to them, “Repent, and let each of you be baptized in the name of Jesus Christ for the forgiveness of your sins; and you shall receive the gift of the Holy Spirit.”
Note that this immersion (baptism) was “in the name of Jesus Christ,” that is, it is by His authority (Matthew 28-18; Mark 16:15-16).
What was the reaction of the crowd, how did they respond? Luke tells us, as he writes by inspiration, in Acts 2:41.
So then, those who had received his word were baptized; and there were added that day about 3,000 souls.
Those who received Peter’s Spirit-given words gave a Spirit-directed response and were immersed for the forgiveness.