Download the file: https://www.waveshare.com/w/upload/3/3f/2.13inch-e-paper-hat-b-code.7z
Extract the downloaded file. If you don’t have a program to do this, I recommend 7-Zip.
In the Arduino IDE: Sketch > Include Library > Add .ZIP Library
Select the arduino/libraries folder from the extracted folder.
It’s not apparent from the name, but Sketch > Include Library > Add .ZIP Library allows you to install libraries from folders, in addition to .zip files.
The structure of this project makes it clear that the creator either doesn’t know anything about Arduino or else has no regard for the users. Unfortunately, I see this sort of thing all too often from the people trying to make money by selling products to Arduino users. You’d think they’d take the time to learn the basics of Arduino since it’s literally their business. Surely, the effort would quickly pay off.
As further evidence that the author is a clown, you will get an error message as soon as you try to compile the library:
E:\arduino\libraries\libraries\epdif.cpp:29:10: fatal error: spi.h: No such file or directory
Apparently, they don’t bother to do the most minimal testing of their code before inflicting it on the world.
Luckily, the fix is easy enough:
Open E:\arduino\libraries\libraries\epdif.cpp in a text editor (the path to the file will be different on your computer, but you will be able to see what it is from the error message.
Change line 29 from:
Save the file.