I give an example from the Seed Arduino LSM6DS3 library showing accelerometer and gyroscope outputs here:
XIAO BLE SENSE cannot communicate with IMU sensor - Products & Technology / XIAO - Seeed Forum (seeedstudio.com)
Maybe you can calculate pitch and roll from these readings.
Regards,
Dave