Open the /etc/dnf/dnf.conf file on your favorite text editor with superuser privileges. Add or edit the following boolean parameter under [main] section.fastestmirror=1
You don’t have to reload or restart any service by yourself. Just update the database.sudo dnf update
DNF will determine the fastest mirror of the repositories based on both latency and speed, and then it will start updating. Enjoy!