sudo rpi-eeprom-update -a
If a firmware update is available you will be prompted to install it and your Raspberry Pi will reboot. More information about updating the firmware on your Raspberry Pi is available elsewhere in the [https://www.raspberrypi.com/documentation/computers/raspberry-pi-5.html#updating-your-firmware official documentation].
Then restart and the firmware will be updated (requires Internet access).