Portainer has no update button in the app. You replace the container, and your data stays because it lives in a volume.
The docs give these steps for Docker standalone:
docker stop portainer
docker rm portainer
docker pull portainer/portainer-ce:lts
docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data portainer/portainer-ce:lts
The portainer_data volume mounted at /data holds the settings, so the new container picks them up. Port 8000 is only for Edge Agents, and the docs say you can drop it if you do not use any.
Caveats: back up first. And keep your agents on the same version as the server, so if the server is 2.45.3, the agents must be too. Check that your original run command used the same ports and volume names, because a new container with different mounts looks like a blank Portainer.
After it starts, log in at https://your-server:9443 and check that the version number changed and the update notice is gone. If you installed Portainer with a Compose file, update the image tag there instead and redeploy it the way you normally do, so you do not end up with two containers fighting over the same ports.
Further reading: Upgrade Portainer on Docker Standalone, On this site: Portainer backs up its own settings with one click, so take one before every update, On this site: you can only restore a Portainer backup on a fresh install, during setup