Pregnancy tests

How long after sex should I take a test so it’s most accurate and how can I get a pregnancy test discreetly I’m 17 and safely sexually active I just want to double check and see that I’m not pregnant but my mom sure as hell won’t buy me a test so how can I get a test easily any ideas?