Exercise the body and also exercise the mind and also exercise the heart. Try to find some fulfilling intellectual and charitable pursuits that you didn’t have before. Mortification of the spirit must be simultaneous with expanding yourself. Sex is sort of the automatic fall-back desire whenever there’s nothing else to focus your desires on. It’s very unusual for a person to be lazy / bored a lot and not also engaged to some extent in sexual sin, whether its social sexual sin or personal sin.
Depending on your circumstances, starting to date people is also very helpful for this. I think it can be beneficial for a person to give themselves a cool-off period when first breaking away from sexual sin, to let its grip over them lessen, but if people waited until they had an absolutely pure heart before finding a spouse, then the human race would have went extinct with the first couple. Of course, once in a relationship, a couple might likewise struggle with keeping themselves pure, in which case they may have to regulate when and where they spend time together, but this is also further motivation until marriage.
On the subject of prayer: devotion and adoration of Mary has been very helpful for me in this regard. In my anecdotal experience, women seem to be more Marian, but I feel like she’s actually the most beneficial to us guys, and we just miss out on using her motherly care

Pray for her intercession and have her guide you along in purity and contentment. I never prayed to a maternal figure before in my life up until a few months ago, and my prayer time has been greatly enriched from it.