How to replace rather than add tags in MacOS?
A native solution:

Define a custom keyboard shortcut for the Finder.app in Settings &gt; Keyboard &gt; Shortcuts &gt; App Shortcuts. Map the menu item “Tags…” to some keyboard shortcut, I used ⌘ CommandS.
Now, selecting any file and hitting ⌘ CommandS brings up a little window where you can enter your tags.

⌘ CommandA selects all existing tags, you can then write your new tags and confirm with enter.

This means you can replace all tags of a file with “Important” by typing ⌘ CommandS, ⌘ CommandA, “Important”, ⏎ Return, ⏎ Return.
The window also does completion of tags, so a (case-insensitive) unique prefix of the desired tag name is enough.