There are a couple ways for us to take this idea of the judgment seat of Christ. First, according to Matthew, all people will appear before Christ on the throne and He will separate the sheep from the goats.
As Jesus addressed the Jews, He spoke in language they would understand, even if they might not have liked it. They would have liked it if Jesus had told them that all the Jews would be on the right hand and all the pagans would be on the left. That would have made sense. Instead, He put it in the context of compassion. And He clearly points out that “all nations” would stand before Him on that day. So the Lord is saying that those who did what He would do, whether Jews or not, would be saved.
We understand, from the teachings of Paul, that the Spirit in us moves us to do what the Lord would do. We know that only believers have the Spirit residing within them. What that means is that those who are led by the Spirit of God, those who live in relationship with the Lord, will be saved. Ultimately, salvation does not come from the works themselves, but through the trust/faith that connects us to the grace of God in Jesus. The deeds done in the body, mentioned in 2 Corinthians 5:10, are judged not by whether they are good works or sins, but by whether they are the work of the flesh or of the Spirit. That’s why Paul says that we have put to death the deeds of the body in the Spirit. The works of the flesh are “foul” (the word used in 2 Cor. 5:10) and the works of the Spirit are good.
I understand that this can be confusing so let me try to make it simple. On that Day, Jesus will look on all people and separate those who belong to Him by grace through faith from those who have trusted in something else.