There has been a long-standing (since at least 2019) bug in the LastPass macOS app which disables the CMD-' keyboard shortcut in macOS.
The culprit is LastPass's hotkeys. Even though CMD-' is not a default LastPass hotkey, all the hotkeys must be disabled in LastPass preferences (or LastPass must not be running) for the OS to recognise CMD-'.
Since the LastPass hotkeys appear by default on a new install, this means that EVERY time an incremental LastPass updated is install, the problem re-appears. My solution has thus been to ... not update LastPass, which is no doubt a security risk.