Here: what compose.yaml describes and what compose creates from that file.
docker compose reads compose.yaml in the current directory. Each entry under services: is a service: compose creates a container from it. A service's keys mirror the options of docker run:
The project name is the directory name. The lesson's stack in ~/stack has the services proxy and backend, and their containers are called stack-proxy-1 and stack-backend-1. compose creates the network stack_default for the project and connects every service to it. A service name works there like a container name in a Docker network of your own: proxy finds backend by name. The networks: key gives a service other networks — services see each other only when they share one.
Stack commands are run in the directory with the file: docker compose ps shows the state of the services, docker compose logs <service> shows one service's log, and with --tail N its last lines.
Read the service logs
The stack in ~/stack is up, and the site has already had requests. Read the last lines of the backend and proxy logs.