How can I distinguish between dysmenorrhea or endometriosis?

Apples and oranges. Dysmenorrhea is a symptom. Endometriosis is a disease. They are not either/or. People with endometriosis generally have dysmenorrhea, if they have a uterus. People with dysmenorrhea may have endometriosis, and if the pain is severe they often do.