A Git stack in Portainer can update itself. The setting people overlook is the one that decides whether it pulls a newer image too.
When you add a stack from a Git repository, switch on GitOps updates. You choose Polling, which checks at a fetch interval you set, or a Webhook URL you call from your repository. Then look at Re-pull image. The docs say it pulls the latest image on every update, like --pull=always in Compose.
Without it, a new commit redeploys the stack, but a moving tag like latest may stay on the old image that is already on the host. That one is easy to miss, because the stack looks like it updated.
There is also Force redeployment. It redeploys at each interval, even when Git has no new commits, and overwrites local changes. I would leave that off unless you want Git to always win.
Caveat: a redeploy can interrupt the service while the container restarts, so pick an interval that suits the app.
If you use the webhook instead of polling, the same toggle applies. Copy the URL into your repository’s automation and the stack follows your pushes. I prefer polling for a home server, because it needs no open port for the Git host to reach, but that depends on your network.
Further reading: Add a stack, Edit a stack, On this site: Detach from Git in Portainer only downloads the main compose file, On this site: migrating a stack in Portainer does not move its volumes