Paul goes in another brilliant direction and shows that after Abraham still not all received God’s mercy, but only those whom the promise extended to, by His grace. Isaac’s children were in the line (not Ishmael’s), and then Jacob (not Esau).
All this intends to show that one cannot EARN the grace of God, but works in response to His love. The law does not intend to show us how to earn it, but the guidelines to live by in faith that He will do what He promised. So we shall pursue life in God by faith in Christ alone!