505 HTTP Version Not Supported means the server does not support the major HTTP version used in the request. It occurs when the client forms its request line with an HTTP version the server cannot handle.
This code is very rarely seen in practice. Normal browsers and clients negotiate a supported version with the server, so it mostly shows up from a broken low-level client or a request with a corrupted version string.
GET / HTTP/3.5
Host: example.comHTTP/1.1 505 HTTP Version Not Supported
Content-Type: text/plain
The server does not support HTTP version 3.5.# Pin to HTTP/1.1 (or --http2) if the server rejects the negotiated version
curl --http1.1 -i https://example.com/# Offer HTTP/2 so clients can negotiate a supported version
server {
listen 443 ssl;
http2 on;
}