The Terminal shows device MAC address instead of device name
When using zsh, one might see the terminal show this line:
[username]@[device-name] [working-dir] %
But on my MacBook Pro, the shell shows the device's Mac address instead, occurring every time I use the terminal.
How can I deal with it and make it show the device name?
MacBook Pro 13″, macOS 13.4