Being judged according to their works in that passage in Revelation where it says it/that, can mean any number of things, as it is sometimes translated deeds and such also, etc...
But it basically means, and if I can maybe do my best to try to sum it up for you, it means "according to who and how and what they were in this life", while they were in this life, etc...
The way they treated others, saw others, etc, the world around them and the people in it, etc, the actions/inactions, or choices and decisions they made, etc, "all of it" basically, etc, behavior also, etc, etc, etc...
Did they make very foolish decisions, or act or choose or be or behave very foolishly in this life, etc, but according to God (and not us) in that aspect, etc, etc, etc, while in this life, etc...
Or judged "according to who and how and what they were in this life", while in this life, etc... Or maybe "who and what they were or how they became by the end of this life", etc, maybe as well maybe, etc...
Anyway, my point is it doesn't mean just works in the way that some are seeing it here, because it has very much more deeper, and very much more broader, and much much more far far reaching implications than just that, etc...
Judged for who you are, and what you were, and more importantly, who you became before or by the end of this life, while or during your time here in this life, etc...
That is what people will be judged by or for, etc...
But again, according to God, and in His eyes, and not us, or in our own eyes, etc.... And most definitely not "anyone else in our eyes", etc... And you'd do very well to most especially remember that last part very very carefully, etc...
And I'm betting a major part of that judgement, will be whether or not His Son had any kind of effect on that and you (or me) in this life as well maybe also maybe, etc...
But again "we" are not to ever judge that, etc, most especially for another, or among one another for or as it pertains to one another, etc...
But only God and God only, etc...
Anyway,
God Bless!