If you are trying/hoping to feel good about yourself by trying to perfect your deeds/words/thoughts, you are pursuing “self-righteousness”. You are doomed to fall hopelessly short of perfect.
But if you start to think that you HAVE achieved a higher value/status because you have behaved so well, then your problem is compounded because you were not only in error by trying this strategy in the first place, but you’re further in error to think you have substantially achieved it.
Now, if you are trying to be self-righteous and you understand how badly you’re failing, then you have a different kind of problem, that problem being that you are going to be quite depressed and wonder what’s wrong with you because you will watch yourself fail again and again. You will feel and, in fact, BE defeated.
Now, there’s this other kind of righteousness that can be IMPUTED (if you don’t know this word, look it up please) to you by the command of God Himself. You will seem to God to be as Holy as Jesus Himself. You will receive all the blessings of being perfectly in right standing with God. Then your job will be to try to remember 24/7 that you are perfectly righteous by God’s command, not by your deeds. It’s easy to forget. Our natural way is to gravitate toward trying to be good by OUR works/deeds/words/thoughts, even after understanding the imputed righteousness of God is ours for the asking.