If one reads Romans 2:5-11 in isolation from the rest of the book of Romans, one might conclude that Paul was teaching salvation by works. However, as you read and study these passages, it’s critical to keep in mind that these verses do not describe how one becomes saved, but the way the saved conduct their lives. These works done are the result of, not the means or basis of receiving salvation.
So patient continuance in well doing, seeking for glory, honor, and immortality; (vs. 7) is not at all set forth as the means of their procuring eternal life, but as a description of those to whom God does render life eternal.
Notice that ALL who receive eternal life are described as such, everyone who does good (vs. 10). Good deeds flow from a heart that is saved and evil deeds flow from a heart that is unsaved. Verse 8 - but to those who are self-seeking and do not obey the truth, but obey unrighteousness--indignation and wrath.
Notice that ALL who do not receive eternal life are described as such, everyone who does evil (vs. 9). What those passages convey is that though our deeds are judged by God, it's not the good deeds themselves which are the basis or means by which we receive eternal life, but the type of deeds expose whether our heart was saved, or not.
These good deeds done out of faith are the fruit, not the root of salvation. If Paul wanted to teach that we are saved by works, then he would have clearly stated that we are saved through faith and works in Ephesians 2:8 and that we are justified by faith and works in Romans 5:1 but that is clearly NOT what Paul said. *Also see (Romans 3:22-28; 4:4-6; Titus 3:5; 2 Timothy 1:9 etc..).
For believers, their works will be judged to determine rewards and loss of rewards. (1Corinthians 3:11-15)