Your question really goes to “justification” and it is understandable that as formerly Lutheran you may need to research the question regarding justification by faith, by father and good works.
You can understand the justification that St Paul speaks of as also being part of a process. Paul doesn’t say it is immediate and lasting.
He explains further in other texts, as does James.
From Scripture supporting that good works as well as repentance and faith is required for our entry into heaven is the following.
Paul also wrote, "Therefore, my beloved, just as you have always obeyed me, not only in my presence, but much more now in my absence, work out your own salvation with fear and trembling; " Philippians 2:12
"Do not be deceived; God is not mocked, for whatever a man sows, that he will also reap. For he who sows to his own flesh will from the flesh reap corruption; but he who sows to the Spirit will from the Spirit reap eternal life. And let us not grow weary in well-doing, for in due season we shall reap, if we do not lose heart. (Galations 6:7-9)
“It is not those who call me ‘Lord, Lord’ who will enter the kingdom of heaven, but the person who does the will of my father in heaven.” [Matthew 7:21]
In very specific response to the question, James wrote:
"Take the case, my brothers of someone who has never done a single good act but claims that he has faith. Will that faith save him? If one of the brothers or one of the sisters is in need of clothes and has not enough food to live on, and one of you says to them, ‘I wish you well; keep yourself warm and eat plenty’, without giving them these bare necessities of life, then what good is that?: if good works do not go with it, it is quite dead.
This is the way to talk to people of that kind:'You say you have faith and I have good deeds; I will prove to you that I have faith by showing you my good deeds–now you prove to me that you have faith without any good deeds to show.
You believe in one God–that is creditable enough, but the demons have the same belief, and they tremble with fear. Do realise, you senseless man, that faith without works is useless. You surely know that Abraham our Father was justified by his deed, because he offered Isaac on the altar? There you see it; faith and good deeds were working together; his faith became perfect by what he did. This is what scripture really means when it says: Abraham put his faith in God, and this was counted as making him justified; and that is why he was called the friend of God. You see now that it is by doing something good, and not only by believing, that a man is justified." [James 2: 14-24]
Yes we must trust to the mercy of God, who alone gives value to good works
However good works are necessary.
Jesus as Judge of souls, clearly demonstrates this in Matthew 25 verses 31-46.
“The Last Judgement”
“When the Son of Man comes in all His glory, escorted by all the angels, then he will take his seat on his throne of glory. All the nations will be assembled before him and he will separate men from one another as the shepherd separates sheep from goats.
He will place the sheep on his right hand and the goats on his left. then the King shall say to those on his right hand,” Come you whom my Father has blessed, take for your heritage the kingdom prepared for you since the foundation of the world. For I was hungry and you gave me food; I was a stranger and you made me welcome. I was thirsty and you gave me drink; naked and you clothed me; sick and you visited me, in prison and you came to see me.
Then the virtuous will say to him in reply, "Lord, when did we see you hungry and feed you; or thirsty and give you drink? When did we see you hungry and feed you; or thirsty and give you drink? When did we see you a stranger and make you welcome; naked and clothe you; sick or in prison and go to see you?
And the King will answer, " I tell you solemnly, in so far as you did this to one of the least of these brothers of mine, you did it to me."
Next he will say to those on his left “Go away from me with your curse upon you, to the eternal fire prepared for the devil and his angels, for when I was hungry you never gave me food; I was thirsty and you never gave me anything to drink; I was a stranger and you never made me welcome, naked and you never clothed me, sick and in prison and you never visited me.”
Then it will be their turn to ask, “Lord, when did we see you hungry or thirsty; a stranger or naked, sick or in prison, and not come to your help?”
Then he will answer, “I tell you solemnly, in so far as you neglected to do this to one of the least of these, you neglected to do it to me.” And they will go away to eternal punishment, and the virtuous to eternal life.
And since Jesus is Judge of souls, we accept His criteria for salvation depends upon our charity towards other people, which He regards as charity directly given to Him" not simply upon our faith in an instant perfection from sin and automatic salvation upon claiming Jesus as our Savior, repenting our sins.