I use the same configuration shared between MacBook M2 and Linux without any issues. Simply install homebrew on macOS, that will provide any additional tool you might need and directly allows to install emacs.