Passage
Knowing that a man is not justified by the works of the law, but by the faith of Jesus Christ, even we have believed in Jesus Christ, that we might be justified by the faith of Christ, and not by the works of the law: for by the works of the law shall no flesh be justified.
Nearby Context
Galatians 2:14 But when I saw that they walked not uprightly according to the truth of the gospel, I said unto Peter before them all, If thou, being a Jew, livest after the manner of Gentiles, and not as do the Jews, why compellest thou the Gentiles to live as do the Jews?
Galatians 2:15 We who are Jews by nature, and not sinners of the Gentiles,
Galatians 2:16 Knowing that a man is not justified by the works of the law, but by the faith of Jesus Christ, even we have believed in Jesus Christ, that we might be justified by the faith of Christ, and not by the works of the law: for by the works of the law shall no flesh be justified.
Galatians 2:17 But if, while we seek to be justified by Christ, we ourselves also are found sinners, is therefore Christ the minister of sin? God forbid.
Galatians 2:18 For if I build again the things which I destroyed, I make myself a transgressor.
Study Lenses
The verse centers on "justified", "faith", "knowing", "works", "jesus", "christ", "even", and "believed". It is saying that the verse draws attention to "justified" and "faith", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 15's "We who are Jews by nature and..." into verse 17's "But if while we seek to be...", so "justified" and "faith" belong inside that flow. In Galatians context, the local focus is Christ, faith, and discipleship.
A plain takeaway is to answer the verse's own emphasis on "justified" and "faith" with trust shaped by these words, not by a vague optimism outside the passage.