Duplicate form ID errors are typically caused by broken plugins. It is reported by the xEdit background loader.
A duplicate form ID means two different records in a plugin use the same form ID, which obviously is not possible.
Broken means the data in the plugin is corrupt or somehow wrong and can not be processed by xEdit or DynDOLOD.
A duplicate form ID in a plugin can be removed by loading and saving the plugin in Creation Kit.
If the error occurs in the bashed patch, use the latest Wrye Bash version from the #wip-builds channel of the Wrye Bash Discord to create the patch or do not use the CELL patcher.
Finalize the load order. Install mods, sort and resolve conflicts. Clean and error check the load order with xEdit. Clean every plugin that LOOT suggests to clean - ignore misinformation that cleaning any plugins is not needed or causes problems. While ITMs are irrelevant in this context, see There are no intentional ITMs. The Batch Plugin Cleaner for Mod Organizer or the xEdit Cleaning Extension for Vortex help to automate some of that. Check the load order for errors with xEdit before generating LOD. Fix all errors. See this video for help (ignore the old cleaning instructions as that was already done).
The cleaning and error checking will address typical errors caused by editing or using the Creation Kit, it does not test for wrong record data caused by bugs in specific Wrye Bash versions.
If removing a plugin lets the process run through without issues, it means the plugin is broken.
Temporarily disabling plugins is a troubleshooting step and not a fix. Avoiding or silencing an error message does not fix the error.
Ignore suggestions to only temporarily disable plugins to complete the process or claims that the plugin is fine to use.
Fix the error or permanently remove the broken plugin. Broken plugins should never be used in the game.
Install Finding Derkeethus Duplicate FormID Fix in case the mod Finding Derkeethus is used.