Keyes KY-039 heart rate sensors use a bright infrared (IR) LED and a photo transistor to detect the reduced IR transmission or increased IR reflection during the pulse. These sensors are more suited to transmission use because of their construction.

Heart rate (HR) sensors how  raspberry-pi

Photoplethysmography, because that's a real word