A proxy or server that mishandles HTTP/2 is easier to spot when you ask for both versions.
curl -sI --http2 -o /dev/null -w '%{http_version}\n' https://example.com/
curl -sI --http1.1 -o /dev/null -w '%{http_version}\n' https://example.com/
The -w variable prints 2 when the server answered over HTTP/2 and 1.1 otherwise. Over HTTPS curl negotiates the version through ALPN, and builds with nghttp2 already try HTTP/2 by default, so --http1.1 is the flag that changes things. The flags also work with -v, which prints every request header. --http3 needs a build with HTTP/3 support. Compare the status and headers of both runs when a site behaves differently per version.
Further reading: curl manual