Hello dr I had my first mucas anal discharge should I be worried and can I do something from preventing to happen again

See your doctor. Mucous coming out of the anus along with a bowel movement can be common in people with irritable bowel syndrome (a condition with bouts of constipation or diarrhea and cramps). If there is pain or bleeding with having a bowel movement, and the discharge looks yellow or green, it could mean some inflammation, like colitis. If you have anal sex, there could be an infection. See your doctor!