Why is it that the Bible tells us that salvation is not obtained by our good works? (Ephesians 2:9)
Why is it that someone -cannot- be saved by being a “good person”?
Jesus answered this question when He said that there is no one good but God. (Matthew 19:17)
There are no people who are good before God.
Obviously, we all have done many obvious sins and evil actions.
By nature, we all are sinners.
But their good works cause many people to not feel a need for Jesus.
By nature, all of our good works are the efforts of sinful people cut off from the life of God–trying to justify ourselves.
We naturally want to do good works because we have a God-given conscience, and our conscience tells us that we should be good.
But we are sinners, both because of our sins, and because of our good motives ultimately done with a sinful and selfish self-justifying motive.
The only way that we can be good is to receive the goodness of Jesus Christ, who lived the perfect life, who died for our sins, who was buried, who rose again on the third day, and who gives us His holiness through faith in Him.
We need to repent (change our minds) about our good works and see that they are not adequate to save us or to make us good people, because their source is not in God, but in a sinful self-justifying self that is cut off from God.
Only by receiving Jesus’ forgiveness and perfect goodness by faith can we be saved.