First, open the terminal and run the following command to update your system by getting the latest software packages for current version of Fedora you have installed
$ sudo dnf upgrade --refresh
Second, install the special DNF plugin for system upgrade (if you haven’t already).
$ sudo dnf -y install dnf-plugin-system-upgrade
Now, begin downloading update for Fedora XX and upgrade progress by using the command (where XX is the version you want to upgrade to):
$ sudo dnf -y system-upgrade download --releasever=XX
Once you finish downloading the new version, run the following command to restart your system and get into upgrade action:
$ sudo dnf system-upgrade reboot
Upgrading the system will take time (for me it took around 20 minutes), so you can now relax, take a walk, and let it finish.
The above has been tested to upgrade to Fedora 35, 36 and 37