Pregancey test

How long from the time you had unprotected sex should you take a pregnancy test 😅