Birth control

Can the pill hurt a fetus? I went to get a refill but idk if I could be pregnant or not cause I was off it for a month and had unprotected sex.