Docker net/http: TLS handshake timeout while pulling or running images

Hi, I have finished the docker course and I wanted to try and play with docker on my CentOS VM. I have installed docker like the documentation said, but when I try to pull an image or run one for the first time such as hello-world I receive an error which is:

docker: error pulling image configuration: download failed after attempt=6: net/http: TLS handshake timeout.

I tried every available solution on the internet and still I get the same error.

I’m using CentOS 7 and Docker version 24.0.6, build ed223bc