Click Sign out (in Outlook the tab is called Account).Signing out of your account in Word or Outlook:
You will most likely need to enter your Microsoft 365 credentials again so ensure you tick any box that says remember my credentials but it should now work for all future documents you open and not require your credentials.