God is more concerned about who we are than what we do. We can try to do right things and yet still not be right. As Isaiah 64:6 describes it, anything good that we try to do in our own power looks like a dirty, filthy rag to God.
In Ecclesiastes 7:15-18 Solomon says that he’s seen two odd things in his life. The first thing is an outwardly righteous person who dies early, perhaps because of all the effort spent doing right. The second odd thing is a wicked person who, despite being wicked, lives a long time. Solomon warns against both extremes. Wickedness leads to spiritual destruction, and righteous acts can be a waste of your time and your life. No matter which route you choose, you’ll perish without God.