How to use BLE with: Seeed XIAO nRF52840 Sense

You mean that it is received by a PC with built-in BLE functionality? If so, what is the application you use to receive on your PC?

To use <bluefruit.h>, the BSP must be non-mbed. If you can compile it, then non mbed is being used. You can also check by selecting “Seeed XIAO nRF52840 Sense” as the board selection.

I tried to compile your sketch, but I get some compile errors. If your sketches are written with reference to some example, please give us that example.

Why not try the following example first?
“File → Examples → Adafruit Bluefruit nRF52 Libraries → Peripheral → blehid_keyboard”

Is your problem that you get compilation errors? Or is there another problem?