Note: Applies to SharePoint Online/O365 and modern experiences only.
In SharePoint Server/on-prem, we have to manage content types and allow links to documents before we can link to documents outside the current document library. But in SharePoint Online/O365, there’s a Link option on the New menu that does all the work for us, and without even needing to adjust the library’s content type settings.
Modern experience in SharePoint Online/O365
In a modern-view document library, simply use New > Link.
Then paste a URL to the file, or select it from recent files which, yes, will include files modified even outside the current library.
This will add a link/shortcut within your document library to the document stored/managed elsewhere.