Install [USBGuard](https://usbguard.github.io/) — it provides a framework for authorising USB devices before activating them. It can pop up a notification when you connect a new device, asking you what to do; and it can store permanent rules for known devices so you don’t have to confirm over and over.