I just need clarification

I was wondering if I can find some questions, I heard this app helps you. So I’m giving it a try. I just ended my period 2 weeks ago and yesterday and the day before I started spotting so assuming I started my period. I had sex a couple days ago as well. Now I just stopped spotting and my next period is in til 12 days from now. It might sound confusing but I just need an idea of what’s going on. It’s been happening since last month. I’ll spot for a couple days and then I’ll start my period. Can sex be the cause of this ? I want to go to an obgyn.