composer update drupal core code example
Example 1: drupal composer update
composer update drupal/core 'drupal/core-*' --with-all-dependencies
Example 2: composer drupal install
composer create-project drupal/recommended-project my_site_name_dir