I’m necroposting considerably, but now in late-2024 several XIAO boards have on-board battery management circuits so that Lipo batteries may be connected directly to the board. In my own parts bin, the XIAO ESP32-C3 and new XIAO RP2350 boards do, but the XIAO RP2040 do not have on-board Lipo battery management.
I presume the OP was posting about the XIAO SAMD21, which does not have on-board Lipo battery management.
If you look at the bottom of your XIAO board(s) and see BAT+ and BAT- solder pads, then it’s likely your board supports battery charging and discharging. Check the schematic PDF associated with your specific model to be sure.
Note that overvoltage/undervoltage protection is likely not present. Lipo batteries will be damaged if they’re discharged below roughly 2.8VDC. If you have an analog input pin free, using a 2:1 voltage divider and monitoring the battery voltage periodically may be wise when designing your code.
Such an example is here, written for the XIAO ESP32-C3, but largely applicable to other boards (except perhaps for the voltage calibration supported by eFuse on the ESP32-C):
Hope this info helps for folks new to this thread!