You need to turn it on, not off. Tap on the button to turn it on.
Using USB accessories with iOS and iPadOS - Apple Support
Allow access to USB accessories
You can allow your iOS or iPadOS device to always access USB accessories, for example, if you use a USB assistive device to enter your passcode on your locked iPhone. Many assistive devices will automatically turn on the setting to allow USB devices the first time they’re connected.
If you don’t connect to USB accessories regularly, you might need to turn on this setting manually.
In Settings, go to Face ID & Passcode or Touch ID & Passcode, and turn on USB Accessories under Allow Access When Locked.

When the USB Accessories setting is off, as in the image above, you might need to unlock your iOS or iPadOS device to connect USB accessories.
Administrators can control the USB Accessories setting on supervised iOS or iPadOS devices using Apple Configurator or mobile device management.