I have a question

So this is my first time taking the pill and my period is really messed up because of me having sex and I’ve been bleeding or spotting everyday and idk when my next period will be or if my period is happening now...

When should I start taking the pill if idk when my next period is?