Something I've come to learn over time is that everyone has a slightly varied definition of euphoria when it comes to substances. There are so many different kinds of effects that drugs have on our bodies that some people may classify as euphoria. One thing I often see people doing wrong when trying out new drugs, is expecting a euphoria they experienced on a certain class of drugs and expecting to feel the same effect on a different drug, not feeling what they expect, and chalking it up to not working. For example taking molly and then expecting a similar effect when taking percocets simply because they're both classified as 'euphoric'.
Hopefully this helps:
MDMA releases serotonin (among other things), which floods the receptor sites producing feelings of empathy, love, closeness, togetherness, which can be a feeling that someone may classify as euphoria.
Amphetamines release dopamine (again, among other things) which induces feelings of invincibility, power, strength, endurance, confidence, excitement, all feelings that differ very much from (clean) MDMA, but can still be classified as a euphoric effect.
Opiates flood the endorphin receptors which give similar feelings to the way one may feel after a good run, hike, or workout. You feel good about yourself, positive about life, comfortable, chilled out but alert, not worried about anything, just content, again, all classified as euphoria.
Benzos, alcohol and even weed might make a person 'dumbed down', slower, very chilled out, can't really think fast enough to be anxious about anything, inhibitions are lowered, at high enough doses a person may feel like they can 'drop out' and just forget about reality. This can be classified as euphoria by some, especially those with anxiety issues. The simple absence of anxiety is euphoric as hell to anxiety-ridden people like myself.
Psychedelics can induce an enlightened state, feelings of wonder, awe, as if your mind was blown, maybe similar to how when you were a child and you saw something that completely blew your little mind and from that day forward you knew what you wanted to grow up and be....the feeling you have at those moments, just 'expanded', again all can be considered euphoria.
As you can see, all different drugs have unique effects that can all be called "euphoria". I think of the word "euphoria" as more of a blanket term for "you will be happier than normal on this, for one reason or another."