Weird question

So I had unprotected sex in my fertile window.

About 3 days after unprotected sex I started birth control on the pill.

My question is could I still become pregnant if I had sex in my fertile window?

Or would the pill stop the pregnancy from developing???

Also can the pill affect pregnancy? Like will it harm the baby if u continued to take it?

Thanks!