==> ERROR: A failure occurred in build()

PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.10/site-packages/pynput-1.7.5-py3.10.egg-info/PKG-INFO'
make[1]: *** [Makefile:4725: snap-confine/snap-confine.8] Error 1
make[1]: Leaving directory '/home/balja/.cache/yay/snapd/src/snapd-2.53.4/cmd'
make: *** [Makefile:1389: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: snapd

Pynput appears to have broken your Python installation. I’m not sure where pynput is available from in Arch, if it’s the default repositories then file a bug in the Arch bugtracker, otherwise contact whoever provided the package.