Abram believed: God made a covenant with someone who trusted in him. The text does not say when Abram first believed. The Hebrew text does not link Abram's belief to the promise about the stars. It simply says that Abram believed the LORD. Abram already had faith. Leaving Ur was his first major act that showed it (see Hebrews 11:8–10).
it was credited to him as righteousness: The New Testament quotes this key statement about Abram's faith three times (Romans 4:3; Galatians 3:6; James 2:23). The New Testament writers use this verse to support the teaching that God makes a person right with himself through trust in him (see also Romans 4:22–23).