The AbortSignal.timeout() static method returns an AbortSignal that will automatically abort after a specified time.
AbortSignal.timeout()
MDN Reference