Sex - as in sexual intercourse, and various forms of sexual activity - carries some risks, and should be engaged in responsibly. There are reasons to abstain from those activities. Maybe you're not ready for the responsibility. Maybe you don't want to deal with the risks. Or maybe you simply don't have access to a partner you trust. But even if this is the case, it doesn't mean you have to remain sexually pure. There are other methods to sate your erotic desires.
Think about it. I don't go out and have sex with somebody every time I get horny. Most people probably don't. Some people are in committed relationships where they can have sex pretty much anytime they want it. I think this is probably the exception to the rule, as most people are not in such relationships, or their partners are not horny and available all day, every day (and even if they were, they'd probably be complaining about how you're not!).
So when I'm not with a person I want to have sex with (and who wants to have sex with me), do I restrain myself from entertaining any erotic thoughts? Do I abstain from pleasuring myself in any way? No. Whether I'm stimulating my body, or just my mind, there are plenty of ways I can indulge my erotic fantasies and desires - and one that I have great interest in is the art of eroticism - the creation and sharing of erotic pictures.
The point of this discussion is that when people think about sex, they think about all the risks of sex, and then they judge sexually-related activities based on those risks. But there are different forms of sex, and not all sex involves the risks of sexual intercourse. We shouldn't judge non-sexually-explicit erotic art as if its creation involved sexual intercourse. We shouldn't treat fantasies as if the activities they describe were being acted out in reality. And we shouldn't react to expressions of attraction as if they were a form of sexual assault.
If you're not having sex, you can still be sexy, and if you're sexy, it doesn't mean you're having sex.