Controlling Servo motor with ATmega328p microcontroller
There are several problems with your code:-


In non-inverting mode the PWM pulse starts at a count of 0 and ends on compare match, so you should load the pulse width directly into the compare register (not subtract it from the period).
ICR1 is part of 16-bit Timer1, not 8-bit Timer0.
An 8-bit timer will not accept 16 bit values.


To produce 16 bit PWM you must use Timer1, then the numbers 2000 (for 1ms pulse width) and 3999 (for 20ms period) will work properly. So change all Timer0 references to their Timer1 equivalents, ie. TCCR0A -> TCCR1A, COM0A1 -> COM1A1 etc. and set up PB1 to output the servo pulse.