Paul wrote a letter scolding the Corinthians church for approving of someone in the church committing open sin he wrote extremely harshly then he wrote a second letter to them regarding the matter these people were already part of the church
“Now I rejoice, not that ye were made sorry, but that ye sorrowed to repentance: for ye were made sorry after a godly manner, that ye might receive damage by us in nothing. For godly sorrow worketh repentance to salvation not to be repented of: but the sorrow of the world worketh death.
For behold this selfsame thing, that ye sorrowed after a godly sort, what carefulness it wrought in you, yea, what clearing of yourselves, yea, what indignation, yea, what fear, yea, what vehement desire, yea, what zeal, yea, what revenge! In all things ye have approved yourselves to be clear in this matter.”
2 Corinthians 7:9-11
because they repented when he warned them and changes thier behavior, his letter made them afraid and sorrowful as he pointed out thier sin, they changed the behavior and now he’s writing telling them everything is forgiven because they were truly sorry for what they did and repented unto salvation