please help needed urgently- heart rate sensor not showing values correctly

Hello friends,
i need some help with the arduino heart rate sensor i am using, its a standard sensor with the three wires two for power and one signal and one green emitter and receiver and it looks like this -

(https://www.amazon.in/gp/product/B07B8KHYC8/ref=ppx_yo_dt_b_asin_title_o09__o00_s00?ie=UTF8&psc=1).

The code i am using is for taking the values from the heart rate sensor and displaying it on a 0.96 inch oled display. But instead of showing heart beats when i put my finger it just shows nothing, like it stops showing any values on the screen and the ECG graph flat-lines. i don't know why this is happening and i also i am a very inexperienced beginner so i don't know how to diagnose the problem is or properly read the code. also the code is taken from the internet. the website i took it from and the code is attached.

hr_oled.ino (1.29 KB)

This is not urgent. The problem is that you are in way over your head.

We recommend that beginners start at the beginning, following the provided and on line tutorials to blink an LED, read a switch, a voltage or a sensor, use the serial monitor, etc.

That way you learn the language and special features of the Arduino and avoid the sort of frustration you are now experiencing.