iPhone 12 Pro and Pro Max, iPhone 13 Pro and Pro Max, and iPhone 14 Pro and Pro Max models feature a LiDAR Scanner next to the rear camera that can be used to measure a person's height instantly in Apple's preinstalled Measure app.
To measure a person's height, simply open the Measure app, point your iPhone at the person you want to measure, and make sure they are visible on the screen from head to toe. After a brief moment, a line should appear at the top of the person's head with their height measurement. You can choose to have the measurement displayed in feet-and-inches or in centimeters in the Settings app under Measure → Measure Units.
The app measures a person's height from the floor to the top of their head, hair, or hat. You can even measure the seated height of a person in a chair.
The circular shutter button in the bottom-right corner allows you to take a photo of the person with their height measurement and share it with them.
The feature is not available on iPhones without a LiDAR Scanner.
Source: Macrumors