SSL timeout on curl and wget but not on firefox`

SSL times out on downloading many files on many hosts using curl and wget but not using firefox.
The output of curl -v https://github.com/Jguer/yay/archive/v11.3.0.tar.gz:

*   Trying 140.82.121.3:443...
* Connected to github.com (140.82.121.3) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* SSL connection timeout
* Closing connection 0
curl: (28) SSL connection timeout

The output of wget -v https://github.com/Jguer/yay/archive/v11.3.0.tar.gz:

--2022-10-16 19:51:32--  https://github.com/Jguer/yay/archive/v11.3.0.tar.gz
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
Unable to establish SSL connection.

Firefox successfully downloads the file:
Screenshot from 2022-10-16 20-06-06
It’s good to mention that I’m under heavy censorship now in Iran.
I have no problem on downloading the file on MacOS and debian based distros.