It depends on where you’re going. Some countries require tourists to take the test 2 days before arrival, while others want travelers to get tested 72 hours before departure. Check here for the current guidelines at your destination.