The Jews living in Rome were telling the Gentile Catholics that they were not the people of God because they did not have the past to support it, the ancestral blood of Abraham in their veins, the Prophets in their heritage, circumcision by the Jews to become a Jew, etc. But instead the Jews were telling the Catholic Gentiles in Rome that they were nothing but heathen sinners, from a people that practices all kinds of vile things.
The Gentile Catholics were becoming disheartened and word got to Paul, who then wrote his letter to the Gentile Catholics in Rome. He wrote to stop the discouragement.
He pointed out that the Jews who were discouraging them from feeling justified in saying “We are the People of God”, these Jews were basing their value as the People of God on the past rather than on the present promise. It is much like people who do genealogy searches for their ancestry and somehow feel they have a special value as a person because of the notoriety of an ancestor. Or like people who think they are special because they ran the winning touchdown at Homecoming when they were in High School. But neither has any real personal virtue as a person.
So Paul brought up the memory of Jacob and Esau to remind them that a person’s value in God’s sight is by a promise God makes to you, and not by your ancestry or birth order. Jacob received the blessing as it was stated he would before he was born, even though it was not the normal order of succession for receiving the blessing. And he spoke of Abraham simply trusting God and journeying to Hebron without any human reason to think he was somehow a Special Person, but only his God’s word on it. (Abraham did “work” - he journeyed over 800 miles. But he did not “work” - did not present God with a pedigree nor winning performance from his past that would require God to choose him).
That is how Paul answered the attempt at dissuasion by the Jews in Rome - You have the promise just as Abraham and Jacob, so you are Justified in knowing yourselves as the People of God. Then he had to remind them of what the non-believing Gentiles are like, recall it to their memories, because they were losing sight of what they used to do as Gentile sinners before they renounced their sinful ways to follow Christ. He tells them this is what you used to be like, and details all the depths of depravity. But now that you are the People of God, shall we continue in sin that grace may abound? No way! We are the People of God and we will live that way, And from this you can see how he made all his moral exhortations to them, to continue in the new life they have found in being the Church, the body of Christ, etc. And he also expresses his longing for his fellow Jews to come about and see that life is not had in an inheritance of the past, but in a present promise from a living and active God, a promise that is delivered in the present moment by those sent to deliver the promise (the Church, the Apostles).
“dead works” from the past versus “good works done in fulfilling your calling”.