I was just involved in a thread on using fedora
and encountered a user who was following the documentation for updating grub.cfg but the documentation he followed (official it seems) still shows the path for use of grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg.
I pointed him to the wiki
after he showed me the docs he followed.
It seems the change in grub.cfg needs to be made more public somehow and possibly the errors could be eliminated if the docs were to tell people to use the /etc/grub2.cfg and /etc/grub2-efi.cfg paths instead of the actual path since that is consistent across all recent versions of fedora where the path for grub.cfg on efi systems has changed between fedora 33 and earlier and fedora 34 and later.