Ovulating and period

Period 2 weeks early. App said I was in my fertile week, thought I’d be ovulating so I had sex 4 days during my fertile week, and now on cycle day 17, my period came down two weeks early. Any insight?