I’m pretty sure that last time I tried to install all of these on a new Mac, people were telling me to jump through all sorts of hoops, such as first installing a package manager (e.g. homebrew) and going from there.
It turns out that these days most of it is already installed (Apache and PHP) and just needs enabling. MySQL has a simple DMG to download and install.
Here is the guide I followed: