Next, reinstall the GRUB boot loader. If you’re on a more recent version of grub, instead of using grub2-install… please use dnf reinstall shim-* grub2-efi-* instead
Since it says a “more recent version”, but the article is 4 years old, I’d like to ask if the command dnf reinstall shim-* grub2-efi-* is still to be used with Fedora 42b, or if there’s already even a newer one.
If you run grub2-install on a system booted in UEFI mode, it will return an error saying you can’t do that. This is special for Fedora and may not apply to other distributions.