To work with macros in Microsoft Office, the ribbon for development tools must be enabled. Enable Developer Ribbon in File → Word Options → Customize Ribbon.
See Microsoft Article https://learn.microsoft.com/en-us/visualstudio/vsto/how-to-show-the-developer-tab-on-the-ribbon?view=vs-2022.