Arduino code for ATtiny45

What core do you have installed?

The ATTinyCore core comes with a version of the Servo library (Servo_ATTinyCore). I highly recommend the ATTinyCore. I tried many cores before settling on that core. It is the best.

After you install the core per the instructions on the git hub page, look in the IDE File, Examples for example code showing how to use the Servo_ATTinyCore library.