3D models can be made from a series of photos with a technique called Photogrammetry. Alice Vision’s Meshroom is an example of open-source photogrammetry software and they explain the process like this:
“Photogrammetry is the science of making measurements from photographs. It infers the geometry of a scene from a set of unordered photographs or videos. Photography is the projection of a 3D scene onto a 2D plane, losing depth information. The goal of photogrammetry is to reverse this process. The dense modeling of the scene is the result yielded by chaining two computer vision-based pipelines: “Structure-from-Motion” (SfM) and “Multi View Stereo” (MVS).”