Docker containers are designed to be ephemeral. To update an existing container, you remove the old one and start a new one.
Thus the process that you are following is the correct one.
You can simplify the commands to the following ones:
docker-compose up --force-recreate --build -d
docker image prune -f