First time taking a Plan B

So I had sex yesterday night and we didn’t use protection but he pulled out.. but we both weren’t sure if he pulled out on time so, I took a plan B like around 2- 3 hours ago should I be good ? Or did I take it too early cause when I took it it wasn’t even 24 hour after having sex.