Period is all over the place

My period is like coming way to early I have been on pill for like 2 years and but my period is coming early and it is happening a lot now and I have been taken the pill at different times sometimes but not that often I am usually really good with it so what do I do ? I Idk y my period is coming early help ?