Closing tabs automatically or manually is a great way to get rid of browser junk and free up RAM. Only if you have a million tabs open will it be difficult to do it manually.
Duplicate Tabs Closer automatically or manually will help you close duplicate tabs.
By default, the extension automatically collects a list of duplicates at the bottom of the window, and when you click on the "Close all duplicate tabs" button, closes them.
However, in the settings you can activate automatic closing of takes. In this case, you can specify which tab to leave: the oldest, newest, with https or pinned.
To determine duplicates, you can configure several rules: ignore the case of URL, www, hash part, search part, path part and add another header comparison.