Keep in mind these terms are not set in stone, the reason you are confused is because people don’t use these terms consistently, not because you are wrong.
But
CLI command line interface, is often used as an umbrella term, including for TUI applications. The name comes from that you are typing commands.
TUI terminal user interface, is often used to describe CLI applications that draws menus in the terminal emulator, like ranger file manager.
Keep in mind these terms are not set in stone, the reason you are confused is because people don’t use these terms consistently, not because you are wrong.
But
CLI command line interface, is often used as an umbrella term, including for TUI applications. The name comes from that you are typing commands.
TUI terminal user interface, is often used to describe CLI applications that draws menus in the terminal emulator, like ranger file manager.