Choose Apple > System Preferences (macOS 12)or Apple > System Settings(macOS 13 and up).
macOS 12Click Users & Groups.
Click the account whose settings you want to change.
Click Login Options.
Clear the Show fast user switching menu as <Full Name> check boxClick the lock to prevent additional changes to the settings.
Close the Users & Groups window.
macOS 13 and up- Open Terminal.
Type the following command:
sudo defaults write /Library/Preferences/.GlobalPreferences MultipleSessionEnabled -bool false, then press the Enter key.- Enter your system password.
.