Scripture says you will know them by their fruit, meaning what we see concerning others we can judge. The book of James says that if you do not have works you do not have faith. Jesus said believe that I am who I say that I am because of the works that I do. The works of Jesus were done openly for all to see and judge. God has prepared good works for us to do the Bible says. We are admonished in scripture to keep adding virtue and good works to our lives.
2 Peter 1:5 says “make every effort to add to your faith goodness, and to goodness knowledge, and to knowledge self-control, and to self-control perseverance and to perseverance godliness, and to godliness, brotherly kindness and to brotherly kindness love. If you possess these qualities in increasing measure, they will keep you from being ineffective and unproductive in your knowledge of our Lord Jesus Christ”.
The opposite of unproductive means to produce something. Something that others can see and judge. We must be adding goodness to our inner selves and to our behaviors as believers. Works do not save us, but they are the witness of a work of Christ in us. The scriptures are very clear on this. Good works follow the believer.
Any church that teaches that good works are legalism and that a believer does not need this visible witness is not teaching a balanced theology. This is not rules following, but an outcome that is assured for the believer who is in Christ, and who applies the Word of God to their lives. This is not legalism. Legalism is following a list of rules thinking that by following these outward rules they are in good standing with God without the need for faith in Christ Jesus.