How to choose between a Popover, Inspector, or Toolbar to edit properties?

macOS apps have the following patterns (and possibly others) for editing properties of selected items:

Popovers (See here)

Popover in Calendar

Inspector Panels (Right Sidebar)

Sidebar in Keynote

Toolbars

In the following example, the toolbar changes in response to what is selected.

Toolbar in Affinity Designer

What criteria should one apply to choose between these patterns?