sudo
I recommend to never use sudo to install any software, ever, including Zig.
Leave your package manage to manage your root-owned directories.
When building from source, a good prefix is ~/.local. With zig build, that would be -p ~/.local.
To build from source, please follow the instructions. If you only want to use Zig and not contribute to it, I recommend instead to download it.