Seeed Studio XIAO nRF52840 Sense The 6-Axis IMU

I am planning to make an in-vehicle sensor using Seeed Studio XIAO nRF52840 Sense.

I was able to get the acceleration by referring to the above URL.
However, as stated on the page, I have to open the serial monitor once to start acquiring acceleration.
Since it will be used in-vehicle, the power will be turned off frequently.
Also, it is not possible to open the serial monitor each time.
Could you please tell me how to acquire acceleration data without opening the serial monitor?

Please post the code, using code tags.

If it includes something like this line, that is the problem.
while (!Serial)
replace it with
delay(2000);

Thank you very much!
I have confirmed that the "while (!Serial)" is in the code.
I changed it to "delay(2000);" and it worked as I expected!
I was really having trouble and this helped a lot!
Thank you so much!