That is, They which are the children of the flesh, these [are] not the children of God: but the children of the promise are counted for the seed.
Note 2 at Ro 9:8: Paul cited six Old Testament references to make his point that God's promises to Abraham and his "seed" were made to the spiritual offspring of Abraham, not the physical.
First, Isaac was not the firstborn son of Abraham, entitled to the birthright and blessing, yet he obtained both because he was chosen by God. Next, Jacob was not the firstborn either, yet he was chosen by God. These two examples confirm that God's promise was not inherited by birth.
Paul also pointed out that before Jacob and his twin brother, Esau, were born, God told Rebekah that the elder would serve the younger. They weren't even born yet, so they had not done any good or evil that caused God to make this choice. This means that the blessing of Abraham was not obtained by individual performance either but was based solely on God's choosing by grace.