I assume one is active while the other is not. With two cameras you have the option of stereoscopic analysis where you have to match pixels of two cameras looking on the scene from a different angle. That uses significant cpu-time though, difficult for real time applications. Results vary because the matching isn't trivial and the difference in angle in smartphone cameras is very low.
If you have a projector, you can do more. I believe Apple uses a flash, which has a low resolution, but is perhaps less cpu-intensive and less error prone, although it has a lower resolution. That would be a real Lidar, which is an active measurement. Of course combining that with sensible stereoscopy nets better results.