The whole point of Romans 11:16-23 (written Apostle by Paul) is the same as Jesus said in John 3:14-18 and Paul in Eph 2:8-9; Salvation is only by belief by faith on Christ’s atonement on the cross as the foretold Messiah. God in the flesh.
The Jews relied on their works and Law following to have the favor of God. This is not acceptable to God and our best works are as filthy rags to God. (Isaiah 64:6)
The Jews were as dead branches that broke off from the tree/root. Gentiles are grafted in by faith; not works in self righteousness.
But if a Gentile tries to be grafted in by any manner other than by faith/belief on Christ crucified and thinks he has replaced the Jews, or because of his good works, that person will be cut off.
Why? Because Salvation is a gift to be received, not of works but by belief on Christ alone. Paul is not contradicting his own teaching in other letters:
“For by GRACE are ye saved THROUGH FAITH; and that NOT of yourselves: it is the GIFT of God: NOT OF WORKS, lest any man should boast.” (Ephesians 2:8-9 KJV)
“Be it known unto you therefore, men and brethren, that through this man is preached unto you the forgiveness of sins: And BY HIM ALL THAT BELIEVE ARE JUSTIFIED FROM ALL THINGS, from which ye could not be justified by the law of Moses.” (Acts13:38-39 KJV)
“For the law of THE SPIRIT OF LIFE IN CHRIST JESUS hath MADE ME FREE from the law of sin and death.” (Romans 8:2 KJV)
“And be found in him, not having mine own righteousness, which is of the law, but that which is through the faith of Christ, the righteousness which is of God by faith:” (Philippians 3:9 KJV)
Salvation can only be achieved through faith in the Lord’s redemptive work on the cross. And that goes for Jews and Gentiles.