download the source, unpack, cd into directory, ./autogen.sh, ./configure --with-imagemagick --with-json --with-mailutils --with-modules --with-rsvg --with-gnutls --with-xml2 --with-native-compilation=aot --with-pop --without-compress-install --without-dbus, gmake (gnumake from brew), src/emacs to test, gmake install, pickup the app in nextstep and done I think.
(thats on intel monterey though)