Depo shot

This is my second time getting the Depo but anyways I’ve read and heard that is you get it within the first 5 days of your period it is effectively right away?? Anyone know if this is true??