” The Catechism of the Catholic Church teaches: verbatim All who die in God’s grace, but still imperfectly purified, are indeed assured of their eternal salvation; but after death they undergo purification, so as to achieve the holiness necessary to enter the joy of heaven (1030).
2 Maccabees 12:41-45 (RSVCE)
41 So they all blessed the ways of the Lord, the righteous Judge, who reveals the things that are hidden; 42 and they turned to prayer, beseeching that the sin which had been committed might be wholly blotted out. And the noble Judas exhorted the people to keep themselves free from sin, for they had seen with their own eyes what had happened because of the sin of those who had fallen. 43 He also took up a collection, man by man, to the amount of two thousand drachmas of silver, and sent it to Jerusalem to provide for a sin offering. In doing this he acted very well and honorably, taking account of the resurrection. 44 For if he were not expecting that those who had fallen would rise again, it would have been superfluous and foolish to pray for the dead. 45 But if he was looking to the splendid reward that is laid up for those who fall asleep in godliness, it was a holy and pious thought. Therefore he made atonement for the dead, that they might be delivered from their sin.[a]