WFE/WFI for reduced power consumption while checking IMU data

Hey everyone! I had a question about how to attach an interrupt to my Xiao Sense nrf52840 for the internal LSMD6S3 IMU. I want to be able to loop in WFE/WFI mode to reduce power consumption and call an interrupt function when the IMU accelerometer vector is above a certain threshold. If anyone is able to provide any guidance, I would greatly appreciate it!