Rhogam shot & no sex??

Ca

I had the rhogam shot last week at 15w2d due to spotting and was told no intercourse for 4 weeks, and nothing else inserted in my vagina either. I am completely fine with that because I want to do everything I can to keep my baby safe, but does anyone know why this is??

My hormones are starting to go CRAZY and every time I see my husband I just want to have him, but I have refrained due to being told not to...