docker compose up -d leaves a container alone when its configuration has not changed. Sometimes you want a fresh container anyway, and --force-recreate gives you one.
docker compose up -d --force-recreate web
Compose removes the container for web and creates a new one from the same image and settings. Volumes are kept, so data in named volumes and bind mounts survives. Whatever the container wrote into its own filesystem does not.
Reasons I would use it: a container whose writable layer got into a weird state, a bind mounted single file that was replaced on the host (the container keeps the old inode, which is a classic trap), or an image with the same tag that you just pulled and want to be sure is used.
Leave out the service name and every service in the project is recreated, which also means downtime for all of them. I would always name the one I mean.
The opposite flag exists too: --no-recreate keeps existing containers even when the file changed. The two cannot be combined. And if dependent services need a fresh start as well, --always-recreate-deps takes care of those, so you do not have to list them all.
Further reading: docker compose up