Philippians 3:4-11. Paul continues to rebuke the Judizers who try to add works of the law to faith in Jesus. Verses 7-8 are the key verses is this segment:
"But whatever gain I had, I counted as loss for the sake of Christ. Indeed, I count everything as loss because of the surpassing worth of knowing Christ Jesus my Lord. For his sake I have suffered the loss of all things and count them as rubbish, in order that I may gain Christ."
The word "rubbish" is too soft of a word; it's better translated as "refuse" or "dung."
Essentially Paul says, I used to be the king of justification by works of the law; and then I met Jesus and I realized that everything else I'd worked so hard to achieve was worthless compared to knowing Jesus. Not just knowing about Him, but truly knowing Him.