2 Corinthians 10:5 says Paul takes captive every thought and makes it obedient to Christ.
Thoughts and thinking is where sin begins. Stopping evil thoughts when they happen and wrong thinking in general, locking it up and asking Jesus to to destroy it and replace it with being filled with the Holy Spirit and His power,(Ephesians 3:14-21) is what we are to do to live an obedient, God pleasing life. The problem is, sin is enjoyable. James 1:13-15 says God doesn’t tempt anyone but we are tempted when our evil desires drag us away and we are enticed. Then, when desire has conceived it, gives birth to sin and when sin grows up it gives birth to death.
Stop sin at the thought process. Live in the power of Christ. Experience victory.