Why do menstrual cramps occur after miscarriage?

Miscarriage is divided into spontaneous abortion and induced abortion. Spontaneous abortion often puts the patient under great psychological pressure, which in turn causes endocrine and menstrual disorders, resulting in non-menstruation; while through abortion, the cervix may be damaged due to improper scraping surgery and the endometrium takes time to repair, which in turn causes menstrual disorders resulting in non-menstruation.