"brew install docker-compose" installs docker-compose 2.9.0 but "docker-compose -v" displays 1.29.2

Hello, I am trying to install docker-compose in the latest version 2.9.0 on M1 Macos Montery 12.0.1. When I run brew install docker-compose it supposedly downloads the correct package. At least the folder /opt/homebrew/Cellar/docker-compose/2.9.0 exists afterwards. However, when I run docker-compose -v version 1.29.2 appears. Which version display is wrong? Which version do I have installed? How can install version 2.9.0? Thank you!

Docker Compose 2.x is provided as docker cli-plugin. As such it needs to be used as docker compose and not docker-compose. Try docker compose --version`.