sudo apt update
sudo apt upgrade
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 in the [https://www.raspberrypi.com/documentation/computers/raspberry-pi-5.html#updating-your-firmware official documentation].