It can be, but sometimes packages are removed from the official repos, but still available in AUR, only running yay -Syu will install the AUR versions of dependencies that are no longer needed, and can leave you with a bunch of unnecessary packages from AUR.
If you run pacman -Syu on its own the unnecessary dependencies will be removed and you won’t get the AUR versions, and then yay -Syu will only update things you actually want from AUR.
It can be, but sometimes packages are removed from the official repos, but still available in AUR, only running
yay -Syu
will install the AUR versions of dependencies that are no longer needed, and can leave you with a bunch of unnecessary packages from AUR.If you run
pacman -Syu
on its own the unnecessary dependencies will be removed and you won’t get the AUR versions, and thenyay -Syu
will only update things you actually want from AUR.