Composer installation on Mac OS M1, M2, or other systems, that too in a very simple way with the help of Home Brew, Simply type brew update && brew install composer, and press enter to install composer on your system.
Best Programming Guides with Examples