Seeeduino xiao running program issue

I'm not familiar with the Xiao but that sounds like native USB. Usually you will put a while(!Serial) in setup() but I suspect that you left that out on purpose because it would never start without a terminal program opening the connection.

However, it might very well be that the Xiao implementation has some more requirements when it comes to printing over USB and block if no serial connection to a terminal program is open.

A simple test could be to take blink, add some serial stuff and see if the led is still blinking.