Action on Middle-Click on Desktop
As Apple has never sold a mouse with a middle button, macOS has never had native support for assigning any custom actions to that input.
However, there are a variety of third-party utilities which will enable this, such as BetterTouchTool or Multitouch.