If you do yay -Syu anyway, then you don't need pacman, as yay is a wrapper around pacman. On EndeavourOS there is a special command to update the system eos-update. It is a wrapper around pacman and supports yay as well (so it can handle AUR). I also have some other stuff like Flatpak and Rust environment to update, so created an alias to bundle all of that. Here is my update commands:
alias update='eos-update --yay'
alias updates='eos-update --yay ; flatpak update ; flatpak uninstall --unused ; rustup self update ; rustup update'