I was experiencing the same problem (UTM QEMU Windows ARM 8GB Ram) on MacBook Pro M4 24GB Ram.
The slowest part for me was, by far, DEX code and merge.
Assuming you already have your project in a non-shared folder, the key for me has been the java version, which needs to be aarch64 and not amd64, otherwise the emulation takes a long time (thanks chatGPT!)
Way to check you current Java architecture (In my case it was
os.arch = amd64)
java -XshowSettings:properties -version 2>&1 | findstr "os.arch"
If this is your case, try downloading
Zulu 19.28.81 / OpenJDK 19+36, unzip it and replace the new Javac.exe path in your B4A IDE. It has worked for me and now it's faster than with my old Windows PC