:2:10: fatal error: OneWire.h: No such file or directory

Your code seems to be a literal copy of Arduino-MAX30100/examples/MAX30100_Minimal/MAX30100_Minimal.ino at master · oxullo/Arduino-MAX30100 · GitHub

That library would be available in the IDE; see screenshot below (MAX30100lib)