Welcome to the Raspberry Pi forums.
Maybe the author/developer/maintainer of the code is the best source of advice?
https://github.com/vrano714/max30102-tu ... ypi/issues
Did you carry out the prerequisite steps listed in the documentation here:
https://github.com/vrano714/max30102-tu ... errypi#run
There is some troubleshooting advice from the author here:
https://github.com/vrano714/max30102-tu ... i/issues/3
If you want to pursue the problem here you will probably need to indicate what Operating System is running on your RPi 3 board, and provide an example of what happens when you try to run the code. For example, there are 3 sample scripts in addition to the library module itself. Have you tried all 3? What actually happens?
A clear, focussed photo of the wiring between the sensor and your RPi might also allow the cabling to be checked.