Miscarriage ?

I’m so at a loss for words my period is regular it has been on time for a long time. I was with a woman for 4 months then I got with a man. When we started having sex we were not exactly careful.... I mean he pulled out but that was it. 8 days before my period I felt off, 5 days before I took a test and it was positive. 3 days later the positive was so faint and I started bleeding . I bled that day spotted the next, no blood for 4 days then bled one more day. And now nothing it’s now the 17th. When I got the positive we definitely weren’t careful cause it said positive so he just didn’t pull out at all. I’m not sure how to even track my cycle now or know what’s even going on.

Has anyone had this happen? I’ve been tracking what I could on this app but I’m so confused. We’re trying now so any tips or advice on what to do. Let me know. Thank you.