High drift with Optical Tracking Odometry Sensor

Did you do the calibration?
You might be looking for these files SparkFun_Qwiic_OTOS_Arduino_Library/src at main · sparkfun/SparkFun_Qwiic_OTOS_Arduino_Library · GitHub

Also: this thread relates to accuracy, but some of the tips might help here too SparkFun Optical Tracking Odometry Sensor (OTOS) Accuracy - #4 by SparkFro