What is the difference between RS-232 and TTL UART?
UART = Universal Asynchronous Receiver/Transmitter. It is the basic chip (or virtual function in a microcontroller) which encodes the data bits serially into a standard format with a start bit, stop bit(s), speed, etc.  But "UART" is only PART of what "RS-232" is.

RS-232 adds the legacy voltage values to the binary values (0/1 or hi/lo, or "mark" and "space" in RS-232 talk).  A TTL UART will output (and input) only TTL levels, essentially 0 bit = 0V and 1 bit = 5V.  And many modern-day gadgets (Arduino, et.al.) simply use TTL voltage levels for serial communication.  But the "proper" definition of RS-232 used a rather HIGHER and BIPOLAR voltages to define zero and one.  Specifically:


0 bit = "space" = +3V ~ +15V
1 bit = "mark"  = -15V ~ -3V


Those voltages date back to the old electromechanical days of Teletype machines which were a miraculous monstrosity of mechanical marvel. And those rather high voltages were needed control the electro-mechanical bits.

But in modern days, the old RS-232 protocol remains as a useful standard, but those old high bipolar voltages are rather a thing of the past.  And it seems rather likely that a whole new generation is growing up that will never remember anything about those old voltage levels and will think that RS-232 is an old legacy 5V protocol.  Especially when power voltages are all migrating toward 3.3V logic levels.

Ref: https://en.wikipedia.org/wiki/RS-232#Voltage_levels