Paul has been arguing for the sake of the gospel of grace for the entirety of his letter to the churches in Galatia. Apparently, they have relinquished their standing in the grace of God to pursue the legalism of the Judaizers who have descended upon them.
Paul has flat-out told them this persuasion is not from God. God would never encourage legalism. While some religious people may misconstrue the Old Testament to say it presents a legalistic framework for relationship with God, they have shifted the emphasis away from the love of God being the motive for all we do.
Paul has let them know the answer is to listen for the voice of the Holy Spirit Who indwelt you in the moment you were born again by faith. It was never work that saved you, and performing works of the flesh in an attempt to make yourself more righteous than you already are is a burden Christ never intended for anyone to bear. His yoke is easy and His burden is light.
The same Holy Spirit who guides you in a walk of liberty with Christ apart the external enemy of those who would seek to induce you is the same Holy Spirit who will also guide you away from the internal enemy of the lust of the flesh.
Truth be told, the lust of the flesh is a greater enemy to face than external pressure to conform to rules of righteousness imposed by religious people.
But blessed be God, the same power that raised Jesus from the dead is also present to help you overcome even the strongest temptations the enemy may throw your way in the realm of lust. God’s Word says so. God will not permit you to be tempted beyond what you may bear. (1 Cor 10:13.) Therefore, when we walk under the guidance and power of the Holy Spirit, we will not fulfill the lust of the flesh. If we do recognize we have fallen into any lust of the flesh, then we also must realize we have fallen apart from the abiding guidance of the Holy Spirit, and have subjected ourselves to lies from within.
Just to make certain we understand the serious nature of what we our dealing with, (in other words, what the flesh is capable of,) Paul provides a fairly comprehensive list of the tragic nature of the works of the flesh. Even the most worldly person would recognize the works of the flesh listed here, and even the most worldly person would agree these works are horrible. They are works rejected by every culture in the history of the world. All cultures everywhere have laws rejecting these works.
On the other hand – we also have by comparison the fruit of the Spirit. You will be led to the fruit of love when you follow the prompting of the Holy Spirit and acknowledge and employ His power to accomplish them. Herein, the weakness of your flesh becomes your strength, because the more you rely upon the power of the Holy Spirit, the stronger you are.
In this way, the righteousness of grace far exceeds the righteousness of the Pharisees.