How can I stop wanting sex?

I'm a 21 year old man and I have a really high sex drive. I'm still a virgin and I get strong urges to have sex. I really want it but at the same time I can't let myself have any because it goes against my Catholic beliefs. I've gotten really close to having some a few times already but I always end things before anything actually happens. This whole thing has been haunting me, I don't want to pursue it anymore, and I would like to keep these urges under control. Any advice would be appreciated.

Edit: i just want to mention that I don't find sex itself evil and I'm not against it. If I was in a relationship and my partner wanted to do it I would. Also I do masturbate

Another edit: No I will not abandon my religion, it's important to me and I like it.