Configuring AUR Helper (yay) in arch linux

What is the optimal way to configure the AUR helper, yay, a third-party package manager for Arch Linux, within the context of the archlinux template to install specific third-party packages while maintaining security and minimizing trust in the third-party installed packages?