Does a simple blink app work?
It sounds like you are using an expansion board, if you take the Xiao off the expansion board does a simple blink app then work?
There have been instances reported where using the expansion board with a Xao has resulted in toasted expansion boards.
Rumor has it, though not confirmed, is that the 3.3v on the Xiao and the expansion board are tied together, that causes a problem.
Symptom, it suddenly stops working, the expansion board is noticeably warm to the touch.
A workaround is to not solder a pin on the Xiao before putting it into the expansion board.
I have two that are expansion boards that are bad apparently due to this, though I cannot absolutely confirm this was the cause of failure.
One can cut a trace on the expansion board to get the SWD pins back, but not so the remaining functionality, I guess, I’ve not tried other than SWD interface.
The Xiao boards seem to be unhurt.
Again, this is rumor has it.