Welcome XCas13 as #curl commit author 1408: github.com/curl/curl/pull/1843…
curl_ngtcp2 handshake timeout should be equal to --connect-timeout by XCas13 · Pull Request #18431 · curl/curl
Default handshake timeout is hardcoded (10 seconds) and doesn't respect --connect-timeout parameter. In some cases 10 seconds can be not enough or too long to "establish a connection"...GitHub