Finding how to get the build from source to work is probably the way to go, but just to give you another option until that works, another option would be to use something like virtual box to run a virtual machine with linux to still have access to the other mac apps on the host while working on your zig things on the guest, docker works too and is similar, but using a virtual machine might be easier unless you are already familiar and comfortable with docker.
I don’t think any of these options is necessarily better than any other they all have positive and negative things about them.
The steps described in this topic have worked for me to compile Zig from source (but it takes a long time on my laptop and I did it on linux not mac): Building Zig from source for dummies?
In general there is a lot of info in that topic on compiling zig for example this:
Nix might be another good option.
So there are many options, let us know what you have tried, what has worked and what doesn’t, when you are getting back to it.