I have just started experimenting with the Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor. (I have NO idea why it's called a Time of Flight sensor).
I am quite impressed with the accuracy of this sensor. The specs say that High Accuracy mode is 200ms, High Speed mode is 20ms.
The range is about 50mm to 2M.
Once, last Century, I worked for a company that developed a system that would scan logs as they entered the debarker to decide what kind of log it was scanning. It determined this by the roughness of the bark. (It could tell if it was fir, oak or pine). Next the log was debarked and another set of IR LEDs and sensors determined the dimensions of the log. The computer then set the saw blades for maximum yield. The whole system cost more than $1 million in 1980. I can guess that it can be done with an Arduino today for a lot less.