I just had anal sex for the first time. Now I am bleeding a lot. What did I do wrong?

Just a little while ago I came out, and I just had sex for the first time. I don’t think I noticed the blood, but now when I use the bathroom there is a noticeable amount of blood and mucus. What did I do wrong? Should I see a doctor? Help please – I am scared.