Updating device firmware using DFU in Zephyr Project on a FRDM-K64F board

I have a question on the step number 4 where you mention to add certain flags which enables the device to automatically reboot. Being relatively new to this, I am not able to figure out where exactly do I need to add the config flags.Can you help me out with this?

Also once a firmware update is flashed and is running on the peripheral device, and let’s say I have another firmware to flash (basically an update). How do I make my device automatically come back into DFU mode and flash the (updated) firmware instead of the currently running firmware? As the device currently is running a firmware, I was wondering how to automatically trigger it to boot again in DFU mode. Hopefully this issue makes sense.

For reference, I want to try this out on an NRF5340 based system.

Any help on both the queries would be super helpful.