Welcome to the club!
Please have a look at the thread XIAO BLE wont compile ArduinoBLE- Arduino IDE.
There are two packages available for the Xiao nRF52840
-
Seeed nRF52 Boards: release
1.1.3
does not work; use1.1.1
instead. The procedure is For Seeed nRF52 Boards Library | Seeed Studio Wiki. - Seeed nRF52 mbed-enabled Boards is based on Mbed-OS and requires a different Bluetooth library. The procedure is For Seeed nRF52 mbed-enabled Boards Boards | Seeed Studio Wiki.