If you get the error message below, there are easy steps you have to do to fix this.
:: installing pacman (5.2.1-1) breaks dependency 'pacman<=5.1.3' required by yay
- yay -S yay-bin
- sudo pacman -Syy
- sudo pacman -S pacman
- yay -Syyu
So all in all, you will replace yay with yay-bin since yay-bin is newer and supports latest pacman. Afterwards, you are updating your database followed by updating pacman to the latest version. Finally, you will do your regular system update maintenance.