You may need to follow additional steps depending on your accessory.
If you’re pairing with Apple’s Magic Mouse or Magic Trackpad and you’re asked to provide a code, use 0000 (four zeros). Please note that in most cases, if the Bluetooth Trackpad or Mouse has been paired with another device, then you will need to wipe the existing pairing, so you can pair it with your iPad. Tap on the Apple Magic Trackpad, Apple Magic Mouse or third-party Bluetooth mouse you would like to pair under Other devices, to pair the Bluetooth accessory with your iPad.If you installed iPadOS 13.4 or later installed on your iPad, follow these simple steps to connect your Bluetooth mouse or Trackpad: How to Connect a Bluetooth mouse or trackpad to your iPad