Galatians 5:22–23 (ESV) … “But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, self-control; against such things there is no law.”
In contrast to the “acts of the flesh” presented earlier in chapter 5, those who are obedient to the Holy Spirit produce beautiful, nourishing spiritual fruit. Notice the fruit in this passage is called the fruit of the Spirit, not the fruit of self-effort. This fruit the Holy Spirit produces in the life of a faithful Christian.
In other passages of Scripture, we are commanded to fulfill the individual characteristics. The answer to this seeming paradox, I believe, is that only the Holy Spirit can produce the fruit; but he will not do so unless we are striving to the best of our ability for them in faithful obedience.
These fruits of the Spirit are in harmony with and not opposed to the law. However, they are not produced by the law but rather by the Spirit working through the believer’s faith.