Abram believed the Lord, and He credited it to him as righteousness. Genesis 15:6
And interesting statement considering that there was no Jesus, no Savior at that time to bring about righteousness. But, consider this: Abram believed the words that God spoke to him. The spoken Word of God.
We now have the written Word of God, the Bible. The Bible is also known as the Truth. Truth with a capital T, meaning that it is the absolutely Truth, that there is no authority or truth greater than it.
We also understand that Jesus called himself the Truth (John 14:6). And, we understand that Jesus was the living Word of God (John 1:1)
So, whether we believe the spoken Word of God, the written Word of God or the living Word of God, if we believe, God credits it to us as righteousness.
Because, that is what God promised us. When you have faith to believe what God says, whether or not you can see it, touch it, or understand it, it restores your relationship with God. Because Jesus Christ is the Word of God and if we believe in him we will not perish but have eternal life. (John 3:16)