Why do I get this message every time I open the terminal? Every time I open the terminal I see the following message:
/etc/zshrc:7: command not found: locale

This is the first 7 lines in the file /etc/zshrc:
# System-wide profile for interactive zsh(1) shells.

# Setup user specific overrides for this in ~/.zshrc. See zshbuiltins(1)
# and zshoptions(1) for more details.

# Correctly display UTF-8 with combining characters.
if [[ &quot;$(locale LC_CTYPE)&quot; == &quot;UTF-8&quot; ]]; then
    setopt COMBINING_CHARS
fi

What should I do to this file to fix the problem?
Your zsh environment isn't finding locale in its PATH.
Either call locale by its full path:
if [[ &quot;$(/usr/bin/locale LC_CTYPE)&quot; == &quot;UTF-8&quot; ]]; then

..or update your $PATH to make sure that /usr/bin is included.