iPhone's LiDAR is not available to web pages. Apple keeps the depth sensor inside ARKit, accessible only to native iOS apps. Safari does not expose it, and the WebXR depth-sensing API isn't shipped on iOS.
So this page uses what Safari does expose: the motion sensor and the rear camera. Hold the phone upright, aim the reticle at a target on the ground, and we compute the distance from the tilt angle and your eye height.
Trigonometry: distance = eye_height ÷ tan(tilt below horizon). Works on any surface roughly level with your feet. Doesn't work for things above the horizon.