For background information, you can read: RFE - Expand Upgrade function…
TLDR:
Basically, it was pointed out many years ago that you can get yourself into trouble by using the “dnf upgrade” command while in a Desktop Environment. The solution was to extend the methodology used while doing a system upgrade to packages.
The syntax is similar:
dnf offline-upgrade download dnf offline-upgrade reboot
Usage documentation is here.