To install Composer, you can use Homebrew Package Manager. We will use version 2.4.16 of HomeBrew.
Open your terminal and search for composer package:

We found that composer package exists. Now we can install using the following command:
brew install composer
The result of execution:

If the installation was successful you can check the version of the composer:
