Setting a simple PWM on atmega328 at certain frequency
For full 16 bit resolution, you'll want Waveform Generation Mode 8, i.e. WGM13:0 = 1000b.
In this mode, you define the resolution (=max counter value) through the value of the Input Capture Register, so you need ICR1 = 0xffff.
Depending on the polarity you want you set the Compare Output Mode COM1A1:0 to 10b or 11b.
TCCR1B = 0; // (If timer may already be running:) Make sure the timer is stopped during (re-)configuration

TCNT1 = 0x0000; // (If timer may have already been used since last reset:) Set counter value to begin of PWM cycle to prevent a potential glitch in the first cycle

ICR1 = 0xffff; // &quot;TOP&quot; = 0xffff -&gt; full range of 16 bit counter

OCR1A = &lt;initial duty cycle&gt;; // 0x0000...0xffff

TCCR1A =
    // Compare output mode (10b):
    (1 &lt;&lt; COM1A1) | (0 &lt;&lt; COM1A0) | 

    // lower 2 WGM bits (00b):
    (0 &lt;&lt; WGM11) | (0 &lt;&lt; WGM10);

TCCR1B =
    // upper 2 WGM bits (10b):
    (1 &lt;&lt; WGM13) | (0 &lt;&lt; WGM12) |
    
    // Set prescaler/start timer (001b):
    (0 &lt;&lt; CS12) | (0 &lt;&lt; CS11 ) | (1 &lt;&lt; CS10);

(Haven't tried this.)
Now the timer is running up and down toggling the OC1A pin every time it passes OCR1A. All you have to do is set a new OCR1A value when you want to change the duty cycle; the rest is done by the hardware.