Key facts - SharePoint Document ID Service
Document ID feature assigns a unique ID for each document in site. Here are all the points you need to know.
Key benefit of using Document IDs is to meet any legislative requirements for organisation documents to have unique IDs. Secondary benefit is having links that are resilient to breakage when documents are moved.
Document ID is a site collection scoped feature in SharePoint Online (SPO) that needs to be activated (screenshot 1 below). Once activated, it enables Document Settings menu in Site Settings that can be used to set a standard prefix for Document ID value (screenshot 2).
When enabled, IDs for existing docs are generated by timer job whereas new docs uploaded to any library in site get it immediately. Document ID column can be added to any site library view to see the assigned IDs (screenshot 3).
A link with document ID remains active even if document is renamed, moved to different folder in same library, moved to another library on same site or even if moved to another library in another site provided the source site exists. Feature uses the /_layouts/15/DocIdRedir.aspx?ID=<docID> page in each site collection to redirect the user to target location.
When moving to another site, the destination site must have the Document ID feature enabled. If it didn't then no document ID will get assigned at destination site.
It is not easy to generate the Document ID link. One way is to Open document properties pane and then right click 'Document ID' and copy link.
The default 'Share' or 'Copy link' is also resilient against renames, moves within same library or within same site. That links uses query string parameters and keep on working as long as the document stays within the site. Link breaks if document is moved to different site.