Plan b pill

I’m ovulating today.i Gad sex with my husband but I don’t want to be pregnant I went to the store and I bought plan b pill it’s ok having my ovulation day and the pill? It will work????