Microsoft Edge browser comes with a useful option for customizing the browser behavior. The options in these include displaying a confirmation pop-up before closing windows with multiple open tabs, and directly closing browser tabs with a double-click.
These above settings are off by default but can be enabled. Here is how:
Open Edge browser, and in the address bar, type in the following:
edge://settings/appearance
Scroll all the way down to the Customize browser section.

There, enable the options Ask before closing a window with multiple tabs and Use double-click to close browser tabs.

By the way, this option of asking before closing a window with multiple tabs also overlaps with the Edge accessibility settings.
When these options are enabled, the browser window won’t close without a confirmation when there are open tabs, and you can double-click the tabs to close them directly.

Happy browsing.