Hello , can anyone help me correct this yaml file please ( error : services must be a mapping)

Ths is the offending part that results in the error message.

A cleaned up version of you compose file could look like this:

version: '2.4'

services:
  db:
    image: mysql:5.7
    container_name: mysql_database
    restart: always
    volumes:
      - db_data: /var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: word@poress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: abc@123y

  wordpress:
    image: wordpress:latest
    container_name: wd_frontend
    restart: always
    volumes:
      - wordpress_files: /var/www/html
    port:
      - "8000:80"
    depends_on:
      - db

volumes:
  wordpress_files: {}
  db_data: {}

I am not a fan of using schema version 3.0 or higher when the deployment is targeting docker-compose. With docker swarm deployments, using 3.8 or 3.9 makes sense.

Though, this is basic yaml skill, which every better editor like visual studio code, notepad++, sublime text3, and many other should validate for you one the fly. The rest is looking up syntax from the official docker compose reference documentation. There is no need to guess here. This is realy the very basic.