zsh is not a terminal, it's just a shell, a programming language with an interactive mode specialised in running other commands.
Terminal emulators such as xterm, gnome-terminal are configured to run your login shell¹ as the initial application that displays there.
From the shell prompt, you typically run other commands such as ls, vi, etc which do output to the terminal as well.
It's not because the title of the terminal window says xterm or zsh, that what you see in it is output by xterm or zsh itself. It is displayed by whatever applications wrote it to the pseudo-terminal device associated with the terminal window.
Specifically, overwrite untitled folder 2/test.txt? (y/n [n]) is not a message that the zsh shell outputs, zsh doesn't overwrite "folder"s. zsh is a Unix shell and "folder" is not even Unix terminology. You have "directories" in Unix, not "folders"².
Having said that, using y/n [n] is a very common idiom when prompting users on a terminal. The general form is:
Question? acceptable-answers [default]
Or variations such as openSUSE zypper's:
Continue? [y/n/v/...? shows all options] (y):
Which asks a question, optionally lists what answers are acceptable and says what the default answer is when you answer nothing.
So, here, it's a yes/no answer with the default answer being "no".
That form is useful when asking a bunch of questions to configure some software, for instance, so that the user can keep pressing enter unless they want to modify a default setting.
Other common forms besides full blown TUIs, are to list the settings as:
1. setting1: current-value
2. setting2: value2
3. ...
What setting would you like to change?
And let the user choose what they want to change (the next prompt for the selected setting can still use the question? x/y/z [x] style).
¹ well the shell referenced in the $SHELL environment which happens to be initialised from your login shell upon login
² We do see that Microsoft terminology leaking to Unix lately though, especially in desktop environments.
yornit assumes you meantn