Plan B too soon?

Lydia

I took plan b a few hours after unprotected sex a few weeks ago and I’m worried. Is that okay? Would it still work?