What then? Israel failed to obtain what it was seeking. The elect obtained it, but the rest were hardened,
Romans 11:7 ESV

Paul’s use of “Israel” can be confusing. At one point he says Israel is the elect. Here he contrasts the elect with Israel. He does this throughout Romans when he talks about God’s choice of one over another. In no case does he mean that the elect is separate from Israel. Rather he is contrasting the whole genetic lineage of Jacob, which is elect in one sense, with that subset that has remained or has become faithful, which is elect in another sense.

The “elect” is not individuals chosen for salvation, but a category of people chosen for a purpose. Sometimes it refers to a person or group chosen to play some role in history or redemption, and sometimes it refers to the faithful remnant. Which is which depends on context.