In the worst case your can firstly backup everything of value, then reinstall Fedora (preferably not touching /home), then dnf upgrade
.
Finally-also: Your can make a list of all installed packages with something like:
# dnf creates list
# awk takes only package names
# tail skips first line with word "Installed"
# sed removes .x86_64 .noarch et all.
# final output stored in my_treasures.txt
dnf list --installed |\
awk '{print $1}' |\
tail -n+2 |\
sed 's@\(.\+\)\(\..\+\)@\1@' >\
my_treasures.txt
# install it all with
dnf install `cat my_treasures.txt`