I normally use paru as my AUR helper (which is more or less a drop-in replacement for yay), and it seems that paru is broken as well. However, the paru-git package is working. I’m not sure if it’s advisable to use a -git package just because the normal and -bin packages don’t work, but it’s working so here we are. I’ll switch back to the regular paru package once the issue is fixed over there as well. I imagine that this is the same issue in yay and paru since paru is essentially just a rewrite of yay which is being developed more actively, so it’s at least somewhat relevant in this thread.
ETA: according to this thread, just installing yay from the AUR is enough to (somewhat) fix the problem. I haven’t tried that, though.