It appears that the vim version pinned in the script doesn't build anymore. I suppose a newer version of the dependencies (compiler/linker/musl?) breaks the build. Luckily this seems to be resolved in newer vim versions and I was able to build vim 9.0.0906 just fine by replacing the link and filename in the script.