Hi NorafifyJalil,
Thank you for the update.
You mentioned "For Office 2016, user sign-in using this account Ahmad@domain.local" and for SharePoint Online using ******@domain.com, since these two accounts have different suffixes, they are not the same account, they are different accounts under the same tenant, this is the cause of the above error message.
For a workaround, you can try to use OneDrive sync client (OneDrive license is included in the SharePoint Online plan you bought) to sync SharePoint Online files to your client. After syncing successfully, you need to uncheck an option first via clicking OneDrive icon> Help & Settings > Settings > Office section > "Use office applications to sync Office files that I open" and uncheck it. After unchecking this option, when you open Office files in the OneDrive sync folder, you can open the file from Office client without loging in. After making changes to the files, you need to manually save the files. Then you can see the status of the file is syncing in OneDrive sync folder. After syncing successfully, you can see these updates from SharePoint Online.
Here is an article about how to sync SharePoint files and folders(refer to this part: Set up Sync for your library). And generally, if you are using Windows 10, OneDrive is pre-installed on your device. You can search OneDrive in the search box to see if OneDrive is there. If not, you can go here to download OneDrive: Download OneDrive
Best regards,
Jazlyn