Docker and docker-compose are two separate packages, so most probably you have installed docker but not docker-compose
I'd suggest to start verifying if docker-compose is present in your system by executing:
docker compose version
it should replay with something like:
Docker Compose version v2.29.1-desktop.1
docker-compose.yml is just a config file to define all containers and all its configs, so in order to use it you should have previously installed docker-compose package in your system