The question relates to adding a link within a document, to a OneDrive Document or folder.
The easiest way is to link to the online version so that the file or folder should be viewable by those that have read or view access.
You can either use 'Sharing" or use an Online Link - the difference being the access security you might create.
The SHARE option gives EDIT access by default and potentially breaks the access permissions set at the higher level.
In some cases this is needed, but it is hard to track.
Refer to this link for instructions and a short video: https://support.microsoft.com/en-us/office/share-files-and-folders-in-OneDrive-personal-3fcefa26-1371-401e-8c04-589de81ed5eb
This works a lot better because it creates a link to the file without adding or changing any permissions.
If people only have read/view access, then that is all they can do,
if they have EDIT access then they can do this if needed.
If they don't have any access normally, then this link will not work.
Thgis is really only useful if those who are to use the link, have EDIT access, and they have added the file or folder to the OneDrive area on their computer.
OneDrive files typically sit under the "C:\users\userid\OneDrive" folder, which becomes a problem if a different user (userid) wants to access this file via a link.
e.g.. A file "document.docx" might typically sit in a folder
"C:\users\myuserid\OneDrive\somefoldername\document.docx"
however on another user's OneDrive, on the same computer, this file will exist under
"C:\users\seconduserid\OneDrive\somefoldername\document.docx"
You can get around this by making the link, as shown below and pasting it where needed (for local access)
"%OneDrive%\somefoldername\document.docx"