Why atmega168/328p starts to reset?
Most of your code and post has absolutely nothing to do with the watchdog timer.

In the comments above, you note using an external 16MHz oscillator, but your fuses set up the chip for an external 8MHz oscillator. Are you actually using a crystal with capacitors, or a ceramic resonator?

Is this a custom PCB? Are you using Arduino or some other Development board? If so, which one? How are you communicating with this chip... over the serial port from a computer? What is your setup? You haven't explained anything about what you are actually trying to do. If you are using Arduino, say so.. and probably ask this on the Arduino channel instead.

The code used to enable and use the USART is not very good, but that's a different conversation to be had. Header files (.h) should never be included in the middle of code, they should all be included at the top of the file. You also need to include avr/interrupt.h to use any ISR vectors.



The AVR watchdog timer has specific register bits that must be set.

Rather than post a long answer, I will direct you to this question about the WDT that I previously answered with details on starting and operating the WDT.

Any other details you might need can be found in the datasheet for the ATmegax8 series microcontrollers, specifically section 10.8.