Runtime/ioHub server error when running experiment

I had the same issue, fixed by changing the keyboard backend (as Elise suggested above) to PsychToolbox.
The alternative is to give PsychoPy privileges to control your computer by way of Sys Preferences / Security / Accessibility. I’m not sure why iohub needs that.

PsychoPy v2022.1.3
MacOS 12.3.1