What's the correct command for updating the GRUB bootloader on BIOS systems in F40?

Yesterday, I upgraded Fedora 39 KDE Plasma to Fedora 40 by following Upgrading Fedora Linux using DNF System Plugin, but I was immediately stopped by the section Update GRUB bootloader on BIOS systems.

The problem I’ve been having is with the command sudo mount | grep "/boot " /dev/sda4 on /boot type ext4 (rw,relatime,seclabel) since all it does is issue the bash error bash: syntax error near unexpected token `('. And so I slightly modified the command by embedding two apostrophe’s (') as such sudo mount | grep “/boot” /dev/sda4 on /boot type ext4 ‘(rw,relatime,seclabel)’ but all that does is issue me bash error bash: /dev/sda4: Permission denied.

Now that I upgraded Fedora 39 to Fedora 40, what is the correct command for updating the GRUB2 bootloader?

The grep portion of that command is in error
Either use grep /boot not all the extra that you are adding.
A parentheses ( or ) are special characters for bash (as is the space and cannot be used as you have that line constructed.

That page you refer to shows

$ sudo mount | grep "/boot "
/dev/sda4 on /boot type ext4 (rw,relatime,seclabel)

which is the command line beginning with sudo
and the result from that command beginning with /dev. It also shows that as an example and not as what your system may show.

It may surprise you that some of that page is rather dated and you should not need to perform ANY of the optional commands shown. (They are after all optional and only used when needed)

If the updated system boots why would you even consider that update is necessary?