I have n8n self-hosted via Docker Compose, I have previously just used the following when updating and not had any issues, til 0.222.4 was released:
# Pull latest version
docker compose pull
# Stop and remove older version
docker compose down
# Start the container (The -d means detached mode)
docker compose up -d
In your compose file what version of n8n is set? If you are using latest I would expect this to be the case. The current versions are below, this is likely to be updated today with 0.224.4 becoming latest.