You'll get the following error in Raspberry Pi OS when locale is not properly set.
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
You can easily fix this via Raspberry Pi Software Configuration Tool (raspi-config).
sudo raspi-config





Generating locales (this might take a while)... en_US.UTF-8... done Generation complete.