Now we know that whatever the law says, it speaks to those who are under the law, so that every mouth may be silenced, and the whole world may be held accountable to God. For “no human being will be justified in his sight” by deeds prescribed by the law, for through the law comes the knowledge of sin. But now, apart from law, the righteousness of God has been disclosed, and is attested by the law and the prophets, the righteousness of God through faith in Jesus Christ for all who believe. For there is no distinction, since all have sinned and fall short of the glory of God; they are now justified by his grace as a gift, through the redemption that is in Christ Jesus, whom God put forward as a sacrifice of atonement by his blood, effective through faith. He did this to show his righteousness, because in his divine forbearance he had passed over the sins previously committed; it was to prove at the present time that he himself is righteous and that he justifies the one who has faith in Jesus. Then what becomes of boasting? It is excluded. By what law? By that of works? No, but by the law of faith. For we hold that a person is justified by faith apart from works prescribed by the law. (Romans 3:19-28, NRSV)
No one will be justified by deeds prescribed by the law.
You can not earn grace.
There is nothing you can do to get into heaven, or merit the grace that God freely gives you.
It is not of your own works, it is because of the faithfulness of Christ to follow through on the plan that God laid out.
It doesn’t make sense and isn’t logical, but that is what it is.
You can not earn it. It is completely up to God.
So trust in the promises and have faith in giving your life up to Him.