Searching External Content in SharePoint Online and SharePoint 2019

You can set this up in SPO via Microsoft Search Graph connectors. This is the modern method to implement this versus the classic SharePoint Search-based method of doing so in SharePoint Server.

Microsoft Graph connector results will not be available via Hybrid Search, if that is an important consideration.