“Script Debugger” wants access to control “Adobe inDesign 2022.app”. Clicking “OK” does nothing and I can’t even get rid of the dialog. Where in System Preferences can I give such permission, and to what?
Look in Security and privacy. As soon as you open it, there may be an option to give SD control of ID. If not, click on the privacy tab, select “Automation” on the left, and SD on the right. You can’t add apps here, but if it’s not checked, you can check it.
First thing to try is a restart. Switch access off first, restart, then turn it on. If that doesn’t work, you’re left with the nuclear option: use tccutil to delete the relevant setting, restart, and try again. A search on tccutil should bring up full instructions, and they’re probably around here somewhere.