Does installing a terminal emulator from play store root my phone? I recently Termux terminal emulator in my phone to copy files from my phone to my mac through a ssh connection. But I fear whether installing such emulators root of damage the OS.
Not at all, a terminal is just a command-line utiity useful for executing shell commands, that might otherwise be difficult to input without such a utility, or alternatively can be achieved using adb via your PC.

On the other hand, rooting involves putting (and modifying) the su binary (that previously didn't exist in the device) giving appropriate permissions, in order to allow certain apps/proceses to execute with elevated privileges.

Furthermore a terminal app can even be used to carry out normal tasks that doesn't require root.