std testing

Is it possible to get tested too soon for std’s? Just 2 nights ago I wasn’t responsible and had unprotected sex and now I just can’t stop thinking about the possibilities of an std but I’m not sure if I need to wait days or even weeks