The question was not good works or i would have said read matt 25 not matt 5 Jesus changed the commandments and the Jews got it; they took up stones to kill Him’Thank you!!!!
Jesus just pointed out it is you heart(thoughts) that convict you: Not what you do!!!
Continuing on in the Sermon on the Mount
7: 21 “Not everyone who says to me, ‘Lord, Lord,’ will enter the kingdom of heaven, but only the one who does the will of my Father who is in heaven. 22 Many will say to me on that day, ‘Lord, Lord, did we not prophesy in your name and in your name drive out demons and in your name perform many miracles?’ 23 Then I will tell them plainly, ‘I never knew you. Away from me, you evildoers!’
Look at those good works done in the name of Christ.
When the omniscient Judge of All says He doesn't know you: He is talking about a relationship.
Once again: Jesus points out that it is not what was done ; but it is a heart issue.
Thks