When to start taking birth control pills

I have a question that torments me: for 4 uninterrupted months I took oral contraceptives (Minigest 15), already at the end of the 4th box, I did not decide to start with a new one because I had finished with my partner and since I did not have sex for a long time, I did not advisable to take hormones. (I think)

On June 2, I took the last placebo and that day I got my period due to deprivation. Then, by not continuing with the next blister, my period was ahead of me, since before it normally arrived at 28 days, but this time it arrived on June 24, that is, 23 days after the last period.
And by that date I had contacted my previous partner again …
That same day, June 24, I resumed the contraceptive pills, but to my surprise I got a very low flow. Only a red stain and the rest a slight brown stain, and I thought it was the rule!
And since then I have continued taking the pills at the usual time.
But my question is that if I thought it was a period and it wasn’t, maybe my body was “cleaning” me of hormones and now I’m with ovarian pain all the time but I don’t get my period.

Another thing: on June 27 I had sex, and since I know that the contraceptive pills take effect from the first take if it coincides with the first day of my period, and I, believing that what came before me was a period, I thought I was protected.
But now he concluded that it was not the rule. My partner ended up outside of me, but I have doubts about whether I can get pregnant because if what I got off was not a period, maybe I have been ovulating (or not) and considering that I am already 39, therefore my fertility decreases. Is there a risk of pregnancy?
Am I currently protected if I am not protected and have normal sex?