Brown discharge in between periods PLEASE HELP ME

My period ended about almost 2 weeks ago but 10 days after my period I started spotting red and brown which faded to pinkish brown which is now brown. This has been happening for about 4 days now and it’s not showing any signs of quitting. I just had sex and there was a lot of it. But I felt no pain. Yesterday and the day before I had a sharp pain in my right ovary. It only hurt if I moved a certain way or laughed or coughed. The next day I took some medicine and went to sleep and I woke up most of the pain is gone. This has happened to me once before months ago with the brown spotting . I feel kinda bloated and tired. This isn’t pregnancy. Do I have cysts? Endometriosis? The last time I had this was when I didn’t have my period for like 5 months. But this time this is happened right after my period. Please help me