Neither AUR programs, nor AUR helpers (such as yay) are supported by Arch, you should read the PKGBUILD and fix the issue or contact the developer with the errors you receive -- Best regards, Cem