In zsh, %h in the PROMPT variable is a special sequence that expands to the hostname up to the first ..
For example, if the hostname is mycomputer.example.com, %h will expand to mycomputer. If the hostname is localhost, %h will expand to localhost.
The %h sequence is part of the prompt expansion syntax in zsh, which allows you to include various pieces of information in the prompt string. Other commonly used prompt expansion sequences in zsh include:
%n: expands to the username of the current user.
%d: expands to the current working directory.
%~: expands to the current working directory, with $HOME replaced by ~.
%m: expands to the full hostname.
%M: expands to the hostname, up to the first . if any.
You can find a complete list of prompt expansion sequences in the zsh documentation by running man zshmisc and searching for "Prompt Expansion".