the concept of purgatory is not really covered in scripture, per se. scripture gives us many verses that imply it, but none that call it by that name, or give us much information about it.
there are verses in paul that talk about being saved ‘as through fire’, and about all of our actions being put through a flame, some of them being burned up like wood, hay, or stubble, some being purified like gold.
this gives the idea of purgatory. but the actual teaching of purgatory comes from the Tradition of the church, which carries equal authority with scripture.
God bless.