What does 'Terminal' derive from?
In Cambridge Dictionary, terminal has two meaning separately reference to computer and electrics.
1) Computer, a piece of equipment consisting of a keyboard and screen, used for communicating with the part of a computer system that deals with information
2) Electricity, the point at which a connection can be made in an electric circuit
Which does 'Terminal' on MacOS derive from?
The first definition, as it relates to computers. See Computer terminal on Wikipedia.
A computer terminal is an electronic or electromechanical hardware device that is used for entering data into, and displaying or printing data from, a computer or a computing system. The teletype was an example of an early day hardcopy terminal, and predated the use of a computer screen by decades.
As @8None1 elaborates in the comments below, the MacOS "Terminal" is more accurately a "terminal emulator" as described in the same Wikipedia article, since a terminal is a piece of hardware while the "Terminal" app is software that emulates that hardware.
If you are limited to these two definitions, the first is closest. But, historically, the application of "terminal" to computer systems derived from its more general use in the field of telecommunications. In that context, as Wikipedia defines it,
In the context of telecommunications, a terminal is a device which ends a telecommunications link and is the point at which a signal enters and/or leaves a network. Examples of equipment containing network terminations are telephones, fax machines, computer terminals and network devices, printers and workstations.
The first computer terminals were teleprinters (Teletypes) that had their origins with Samuel Morse and the telegraph networks of the 19th century. Terminal programs in modern operating systems connect to a channel called a PTY, or psuedo-teletype. These terminal programs emulate the physical terminals (teletypes followed by graphical displays) that once connected to a mainframe.
A terminal is an endpoint of a process. For example, an airport terminal is the starting or ending point for a flight.
In the computer context, a terminal was a device that functioned as an endpoint for data flowing (from the computer to the user or vice versa).
A terminal window or terminal emulator functions much like these old devices.