Updating Home Assistant is one click, and rolling back is the part people think about afterwards. The command line can take a safety copy first.
On Home Assistant OS the ha command has a core section. The docs list this one:
ha core update --backup
It updates Core and first creates a partial backup, which helps if you need to downgrade. To go to one specific release, the docs show ha core update --version x.y.z. Backups are managed with ha backups list, which shows each backup with its slug name, and ha backups restore slugname restores one. You can also create one yourself with ha backups new --name nameofbackup.
Run ha core check after the update to check the configuration.
Caveat: this page is about Home Assistant OS, where the ha command talks to the Supervisor. I run Home Assistant as a container, and I would not expect these commands to exist there, so check on your own install before you plan around them. Also, a partial backup is partial. It is meant for going back after an update, and it does not replace a full backup that lives off the machine.
Further reading: Home Assistant OS common tasks (Home Assistant documentation)
Going deeper: Guide: Home Assistant backups in Docker, with a failure alert on your phone and a copy off the box