word – AddIn Office Web with SharePoint connection

I am developing Office Web AddIn and want to connect to SharePoint.

Currently, I am a link below to develop the addin.

https://docs.microsoft.com/en-us/office/dev/add-ins/quickstarts/word-quickstart?tabs=visual-studio

I looked around to see if I could get a sample code but I could not find anything.

What I'm looking for is a solution where I would like to connect the SharePoint item associated with the current document and get the properties of the share point item.

I am open to any type of solution REST / CSOM / Graph