How long until IUD is effective?

AJ

I just got an IUD in today, and while I am sure these cramps will keep me from having sex for a while, I was curious how long it is until it is effective?

SIDE NOTE: If anyone has tips for these cramps, if love to hear them😩