Install Drupal using Composer
Use the officially supported composer template drupal/recommended-project.
For Drupal 10 version:
composer create-project drupal/recommended-project site_dirOr also possible to specify the Drupal version:
composer create-project drupal/recommended-project:^9.4 site_dir