Update SharePoint metadata
This use case assumes you have configured a sync of Salesforce fields to SharePoint metadata in the object configuration in the 24Files Manager app.
This off-the-shelf sync functionality will sync the Salesforce field at the time of record creation.
You can use an APEX action to sync the Salesforce field(s) at other moments, e.g. when the record gets updated.
Please consult the example 24Files - Upload SharePoint Metadata that is shipped with the package.