Will Nuvaring prevent pregnancy?

So I had unplanned unprotected sex last night. I have a new nuvaring to put in. If I put it in now, will it prevent pregnancy? I'm really worried 😬