As a demisexual, I need to feel some kind of emotional connection with the person for there to even be a chance of sexual attraction. Often this is a connection on the spirit, soul, or heart level, but sometimes it's purely a mental connection in that we have shared a lot of intimacy in our conversations. Once I have this, the following four elements together may create sexual desire (in order of importance, not chronology).
The number one thing that determines my sexual desire is consent, both ways. To desire someone I need them to tell me that they want sex with me. No, I don't mean say flirty things or act attracted, I mean actually flat-out say "I want to have sex with you" or say an unequivocal "yes" if I ask if they want to. I'm pretty sure I won't ever feel sexual desire for anyone who doesn't feel it for me. I might have in high school (before I ever had sex), but not since I became sexually active. I also need them to be fully invested in my consent, not just asking but also showing awareness of my reactions and adjusting accordingly.
Next in importance is bodily respect: them not having terrible ideas about bodies, sex, or gender. No assigning stereotyped personality traits to body parts including genitals. No assigning body types/parts as attractive or unattractive (this is gross no matter what shape you decide is best). No ideas about more or less legitimate kinds of bodies. No believing in rules for genders. Never imposing gender on me. Not interpreting my fat as a cause or effect of my personality. Basically, not being sexist, cissexist, or looksist.
Next is awareness; self-awareness, awareness of me, ability and desire to maintain this awareness and express it throughout. To feel sexual desire for someone I need to be able to sense them letting my touch reach them emotionally. (otherwise I will feel unappreciated and/or worried that they don't really want it) I need a balance of reactive and attentive. I do not want someone who always turns into pure reaction (sometimes I might want to provide that space but not often, as it's exhausting!), but I also don't want someone who isn't reactive. I want a person who can stay mentally, spiritually, and emotionally present while feeling intensely. Someone who will still notice if I seem 'done' even if they are in the throes of sexual ecstasy. Someone who can make eye contact with me or grip my hand during sex and I can feel the 'click' of that connection.
Last is generosity (desire to give). If you could be happy only receiving every time we have sex (while knowing that I love being touched) or if you never offer anything and only give when asked, I'm not interested. I know some people are scared of not being perfect and that's why they don't want to give, and I can empathize with that, but it is not a turn-on. People who have no desire to give sexually would not be people I'd be sexually compatible with. People also need to not be so full of need that they subconsciously pull at me. That one I can't really explain, it's just a thing I feel. I don't think I can feel desire for anyone who is looking for salvation outside themselves.
If these are all met, I can have satisfying sex with a person. But each of these four elements is fucking rare. Especially awareness. So many people check out when they have sex and go to a purely physical place or have sex as a mental escape. I just don't find that remotely appealing.
Usually for it to go from "I can feel sexual desire" to "I actually want this enough to deal with the hassle of the STD/trigger/expectations conversation and the potential concerns of my current partner(s), therefore I will flip my internal switch and become sexually attracted to them" I have to be in love with the person. I don't find sex more nourishing than cuddles or conversation, so it's not worth the bother unless I am in love and therefore want to experience all possible connecting activities and want to bring them joy in any way available to me.
In a world without oppression where people valued awareness and giving, there would be many opportunities for me to want sex with people. In this world, maybe three of my previous sexual relationships actually contained all of these qualities. I'd be willing to explain consent if the lack was just in practice and not intention (some people want to avoid breaking others' boundaries and don't know how), but I wouldn't be willing to be lovers with someone who needed training in one of the other areas. As I get better at understanding myself, I'm not willing to train people into these things with personal investment. That is, I'd help them learn if they wanted to know, but not so that I could have sex with them.
I used to have more sex but looking back I can see that it was mainly for the social capital. Allosexual people often give more attention and affection and resources to those they have had sex with or think they might have sex with. I wanted to feel valued, and it didn't harm me to be sexual (I was still careful), so I was not very discriminating in who I had sex with. My criteria was just #1 - consent. Eventually I realized that the effort outweighed the reward for me. Being included more often and treated as a more interesting person wasn't worth the effort to either have sex that didn't nourish me or spend a ton of energy teaching them skills so that we could have sex in a way that did nourish me. Most people just don't have (or value!) the skills/qualities that I look for in a sex partner.