If I may inject something here…
IMO Romans one and two contain the foundations of Paul’s teaching on eternal judgment.(Hebrews 6:1-3 foundation doctrines)
Works themselves will be judged, we know from 1 Cor 3:13-17…
12Now if any man builds on the foundation with gold, silver, precious stones, wood, hay, straw, 13each man’s work will become evident; for the day will show it because it is to be revealed with fire, and the fire itself will test the quality of each man’s work. 14If any man’s work which he has built on it remains, he will receive a reward. 15If any man’s work is burned up, he will suffer loss; **but he himself will be saved, yet so as through fire.
**
So salvation is not by works, but faith without works is dead(faith is such that it will always produce works of some kind- even if it is only forgiveness where their was hatred, remorse here there was indifference or arrogance.). The first thing is repentance and faith towards God(a broken and a contrite heart), which is a gift of grace…
Eph 2 8For by grace you have been saved through faith; and that not of yourselves, it is the gift of God; 9not as a result of works, so that no one may boast. 10For we are His workmanship, created in Christ Jesus for good works, which God prepared beforehand so that we would walk in them.
In Romans 2 Paul states, as he does in several places(2 Cor 5:10, 1 Cor 3:12-17) as Jesus also does(He will judge them according to their deeds, Mt 6:27) that works will be weighed(I am he that tries the reigns and the hearts) in for everyone(for we must all stand before the judgment seat of Christ to give account for the deeds done in the body). But repentance and faith towards God washes out evil works. John says, “if we confess our sins He is faithful and just to forgive us our sins and to cleanse us from all unrighteousness.” So I extrapolate that that is what happens when one bows the knee before the revelation of Christ crucified, risen as Lord and Savior. This further evidenced in John the Baptist “And they were baptized by him in the Jordan river, confessing their sins”. When one confesses their sin they are washed, because they have separated themselves from the sin in their hearts, “Agreeing with the law of God in [their] mind, that it is good”- and this referring to the Great Law, the law of love.
Salvation is by grace, but works will be judged “their conscience either excusing them or accusing them on the Day when God judges the secrets of their hearts by Jesus Christ”
For those who never had the law or the gospel, the universal law of God explained in Romans 1 will apply. Made evident by the light of the glory of God in the face of Jesus Christ(2 Cor 4)
For the wrath of God is revealed from heaven against all ungodliness and unrighteousness of men who suppress the truth in unrighteousness, 19because that which is known about God is evident within them; for God made it evident to them. 20For since the creation of the world His invisible attributes, His eternal power and divine nature, have been clearly seen, being understood through what has been made, so that they are without excuse…
In His presence all the secrets of all the hearts will be revealed and “The Lord knows those who are His”-
Those who have a broken and a contrite heart(honest before Him and within themselves about their faults before Jesus who is the fire) will rejoice in forgiveness. Others may endure some form of kolassis( I believe that is simply being penetrated by the light that brings every hidden thing to the surface.)
So salvation is by faith through grace. This grace is often given in the midst of judgment(fire/light that opens the heart) and works apply only as evidence of the condition of the heart, as James said, “faith without works is dead”
And thats the short answer LOLOLOLOL.