composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition . version 2.3.4 code example
Example: install magento 2 using composer
1
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <install-directory-name>