Please try the sketch for the nRF52840 available at the link below. At the very least, it should not produce any compilation errors. Please use BSP version 1.1.12.
Connect the brown lead of the PPK2 to the + terminal of the battery pad and the black lead to the – terminal of the battery pad, then apply 3.8V.
Is there a while(!Serial) statement in the sketch?
Why not start by testing whether the XIAO is working properly using Blink.ino?