Google has developed a feature to track your heart and respiratory rates using your smartphone for its Google Fit app. People like me who use Google fit to track their activities are happy to hear this news.
The company has rolled this feature currently for Pixel 6 users.

Google Fit app will track your heart and respiratory rates cameras as most smartphones available in the market have no dedicated sensors for measuring heart rates. In your to measure heart rate, a person will have to place his hands on the rear camera. For accurate measurement, he will have to take this reading to a place with better lighting.
Readings are taken by the app by sensing changes in finger color. These readings can be saved in Google.
I would like to mention here that Google has given this feature in Pixel 4a and Pixel 5 smartphones. In the earlier versions, a user had to use his flashlight to get accurate readings in low-light conditions.