Genesis 15
And he (Abram) believed in the Lord, and He (God) accounted it to him for righteousness. Genesis 15:6 NKJV
Abram believed the Lord, and He credited it to him as righteousness. It was Abram’s belief in the Lord that made him right with God, not his actions. God knows that we are flawed human beings, and He knows that there is no way we can earn our way to Him through good deeds. It is only through our faith in Jesus Christ that we can have right standing with God.