Time based One time password apps like Google Authenticator usually show a "time remaining" until a new OTP is created. 😰
No need to wait for a fresh code though!
Even if you copy the OTP at the very last second, you'll usually have enough time to paste it into the login form. The login form will usually extend the validation for a predefined time. ⏳
Try out… and relax. 😄