Your issue sounds very familiar - I just can’t remember exactly what I did to resolve it. Looking back at my command history, I can see that I looked up libalpm, and then just reinstalled yay (i.e. I didn’t do anything specific to install or change libalpm).
Generally it’s best to use yay -Syu (or just yay) instead of pacman -Syu if you are using the AUR. yay performs the same tasks as pacman -Syu, but additionally updates the AUR packages. Sometimes an issue can arise where a package in the AUR gets out of synch with the main repositories.
There are lots of useful packages in the AUR. Occasionally, one of them stops working (most recently puddletag - though there is a fix), but I’ve not really had any great problems with it.
I would say that 95% of the packages I install are from the main repositories though.
If you want to search for a package, yay -Ss {packagename} will look in all the standard repositories, AUR, and your own system, and return what it finds (local means you already have it installed, otherwise it will give you the repository name). You can enter just a part of the name, and it will return any package that includes that character string in its name, plus any package that includes the string in the description.
I’m not aware of an application browser for pacman or yay, such as is provided for distros like Mint, but ‘List of applications - ArchWiki’ is always a decent place to start when looking for something.