Understanding setup of IMU interrupt using LSM6DS3

I am using the Seeed XIAO nRF52840 BLE tag for setting up an IMU single tap interrupt. It works fine however, I am trying to figure out how to change the threshold of the interrupt to just certain axes of the IMU. For example, to only cause an interrupt when a significant change in acceleration is detected in the z-axis but not the x or y-axis.

Below is a screenshot of the interrupt setup using the LSM6DS3 library:

Wondering if someone could explain what each line in the code above is setting in the interrupt and what each register is for.

I would also like to know if the threshold can be set on specific axes. I noticed that the LSM6DS3_ACC_GYRO_MD1_CFG register sets the threshold for the interrupt but this seems to be a threshold for the overall acceleration as opposed to just one axis. Thanks for the help!