I'm beginer please show me direction to solve problem)

Good day
I’m a beginner and I try to make tasks.
So I have docker-compose.yaml

    build: backend
      - db-password
        condition: service_healthy
    # We use a mariadb image which supports both amd64 & arm64 architecture
    # image: mariadb:10.6.4-foc If you really want to use MySQL, uncomment the following line
    image: mysql:8.0.27
    command: '--default-authentication-plugin=mysql_native_password'
    restart: always
      test: ["CMD", "mysqladmin", "ping", "-h", "", "--silent"]
      interval: 3s
      retries: 5
      start_period: 30s
      - db-password
      - db-data:/var/lib/mysql
      - MYSQL_DATABASE=example
      - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
      - 3306
    build: proxy
      - 80:80
      - backend
    file: db/password.txt

When I enter command docker-compose up -d
I received ERROR :

ERROR: The Compose file ‘./docker-compose.yaml’ is invalid because:
Unsupported config option for volumes: ‘db-data’
Unsupported config option for secrets: ‘db-password’
Unsupported config option for services: ‘proxy’

I will be appreciated if you point me where I have to start

Do you try to use swarm services that create container tasks (=docker stack deploy), or do you want to simply create containers with docker-compose?

Officialy secrets are only supported with swarm services:

Note : Docker secrets are only available to swarm services, not to standalone containers. To use this feature, consider adapting your container to run as a service. Stateful containers can typically run with a scale of 1 without changing the container code.

source: Manage sensitive data with Docker secrets | Docker Documentation

Regardless of what the documentation claims, I have seen people using version: "3.x" versions of the compose schema that where able to use secrets with docker-compose deployments as well!

Try adding version: "3.8" in the first line of your compose file. This will influence which compose file schema version you use. I guess since you used no version at all, compose will assume a version: "1" schema.

Note1: the build: item you used is only valid for docker-compose. It is not supported for swarm stack deployments.
Note2: secrets are the only reason to not use version: "2.4" with a docker-compose deployment, as it does not allow secrets, but allows to configure every aspect that docker run offers, while version: "3.x" does not support every aspect. If you don’t care for ressource constraints (which productive deployments always should) then it shouldn’t matter if you use the latest 2.x schema version or latest 3.x schema version.

I want to simply create containers with docker-compose,
Thank you for your reply, your advice solved my problem. But finally, I used version 3.3 and replace some rows in the file according to comments from docker-compose.yaml.