Compose v2 is a Docker CLI plugin rather than a separate Python program, which is why the command lost its hyphen and why both spellings exist on every machine for a while.
$ docker-compose version
docker-compose version 1.29.2, build 5becea4c
$ docker compose version
Docker Compose version v2.2.3
# two programs, two implementations, one compose file.
# and the alias that papers over it badly:
# alias docker-compose='docker compose'
Running both across a team produces bugs that nobody can reproduce, because the two implementations differ in container naming, in how they resolve relative paths in env_file, and in exit codes from up. The version that works is picking one, pinning it in the development image and in the pipeline, and putting the check in a script rather than in the onboarding document. The alias is worse than either, because it makes the machine lie about which one is running.