Using motion detection to turn lights on and off or turn off with Alexa?

Latency is most commonly an issue of the brand/model of sensor and, just as importantly, the placement of the sensor.

You may already know this, but most of the motion sensors that work with SmartThings are PIR, passive infrared sensors. They measure very small changes in heat the passes across the lens of the sensor.

Many people will think of the motion sensor like a camera and place it so that a person walks straight on towards it. But this can actually result in the sensor not triggering. The best placement is to position the sensor so that the person walks sideways across the detection field. See the community FAQ for details (the topic title is a clickable link)

Also, some sensors have parameters that allow you to adjust the “sensitivity“ which will reduce latency. But it will also reduce battery life, so that’s a trade off you have to consider.

Finally, the official smart light feature can run locally, without requiring a cloud trip to turn the light on, but only when certain device type handlers are used. So that’s another possible factor.