With the latest version of Docker Desktop 4.26.1 in Windows 10, running docker compose or docker-compose is giving the below error.

docker-compose
docker: 'compose' is not a docker command.

Make sure that we use the right path. Run the docker-compose.exe from the resources\cli-plugins folder. Add D:\Program Files\Docker\Docker\resources\cli-plugins to the PATH as well.