RE: Upload document to Sharepoint through Dynamics (with code)
Yes, there is another way to do it other than using a plugin.
Upload the document as an attachment to a note. Then, a FLOW (Power Automate) would trigger on the creation of a note, move the note attachment into SharePoint, and then delete the note.
If you need metadata around the document, then create a new entity called "Uploaded Document" with the needed MetaData fields in it, and add the Timeline to the Uploaded Document form. Then, just set the metadata, upload an attachment to a note, and let the flow take care of the rest.
See powerusers.microsoft.com/.../290923