Can people be righteous or not?

There is a verse that I came upon recently that seems a bit confusing to me. It is Romans 3:10 which says “As it is written: There is no one righteous, not even one.” Later in verse 12 it says, “there is no one who does good, not even one.”

I then started to think about other passages I’ve read that states the opposite.

Of course we have the story of Noah in Genesis 7:1 which states,  “The lord then said to Noah, “Go into the ark, you and your whole family, because I have found you righteous in this generation.”

There was the servant Job who never turned from god.

And there is even the verse in James 5:16 that seems to speak to us normal people that states, “Therefore confess your sins to each other and pray for each other so that you may be healed. The prayer of a righteous man is powerful and effective.” This says to me that some men are righteous and their prayers are effective.

So again, I ask of this seeming contradiction in the bible. Can mankind be righteous or not?