Help me

The doctor prescribe me with Medroxyprogesterone 10 Mg 30 days to regulate my period but my period comes every month just a little later.. I had sex my fertile window so I’m afraid I can be pregnant or about to so should I take these pills or will they cause harm for the baby to implant?