You shouldn’t be using H2 in production, so if you’re using Postgres/MySQL, then the Metabase container is just an application and can be destroyed, since the settings/metadata is stored in the external database.
https://metabase.com/docs/latest/operations-guide/start.html#migrating-from-using-the-h2-database-to-mysql-or-postgres
https://metabase.com/docs/latest/operations-guide/running-metabase-on-docker.html#using-postgres-as-the-metabase-application-database
Just remember to always backup before doing major changes, so you can always revert.
If you decided to use Docker, then you should really read the documentation, so you’re comfortable with how it works - upgrading containers is not unique to Metabase:
https://docs.docker.com/
Without knowing your container names, you would do something like this (ref):
docker stop metabase
docker rm metabase
docker pull metabase/metabase:latest
docker run -d -p 3000:3000 --name metabase metabase/metabase … (I don’t know your run config)