Scripture tells us to flee immorality to bring glory to God and when the heart is determined to glorify Him then the fleeing becomes the new response. The person is much more focused on the understanding that to act on my desires will grieve the Holy Spirit and while the fight between flesh and Spirit is there, the ability to say “no” to the flesh is greater, and that person can now refuse to obey their flesh.
When the heart is focused on the Lord and is truly honest with themselves, they can admit that this is not what God intends sex to be, and become determined to vow not to set their eyes on no unclean thing.
All these are biblical responses that puts the emphasis on glorifying God by changed thoughts, beliefs and desires.
In addition, there is a settle recognition that all my “needs” are met in Jesus Christ. All the legitimate needs we have God promises to meet, and He is always faithful! Rather than taking sex from someone and saying it is love, I can now understand that real love is proven by Romans 5:8.
All of these heart attitudes are centered around glorifying God with how a person lives their life. It is a recognition that fornicating, adultery, pornography, masturbation and all other sexual immorality are not “needs” but an illicit desire of the flesh. It is believing that all our true needs will be met in Christ.
The heart that desires to honor God above all will focus on these things and then take the actions needed to be sure this type of temptation stays at bay. They will do whatever is needed to avoid sexual sin.