I don't know of a list of every possible name of UI element. But there are some lists for some elements. For example:
Space Type Items — Blender Python API
You can also easily identify things in Blender itself, using the Developer Extras and Python Tooltips. You can enable them in the Preferences > Interface tab:

Tooltips
Python tooltips will display when hovering UI elements. Hovering a menu will show its menu class (if your menu opens instead, disable "Open on mouse over" in Preferences > Interface tab).

Properties will show their full data path, operator their method name, etc.

Developer Extras
Developer Extras add a lot of usefull things for devs, like the operator search or copying python commands. And in particular for our topic:
It lets you
RMB a UI element like the node editor header and select "Edit Source", and it will open the corresponding python file describing the UI of that element, and it will even jump to the corresponding line of code.
If you know a bit how BPY works, you will easily find what you need there:

May it be class names, idname, space types, ...
Edit Operator Source
UI elements called by operators don't have the Edit Source contextual menu.
But there is an addon shipped with Blender that allows you to do exactly that:
Edit Operator Source — Blender Manual
Enable it in the preferences, open the text editor's sidebar, click the Edit Operator button, paste the operator method (without bpy.ops.) and click it in the search result. It will show the different elements available for that operator, chose the one that you need, and it will open in the text editor.
NOTE (2023-07-06):
This addon seems to have a bug (recursion errors) when other addons such as Animaide are enabled. If you encounter such an issue, try disabling Animaide, rebooting Blender and trying again.
Bug reports were made on both addons, with a proposed patch for Edit Operator Source. You can follow up the bug reports here:
Blender's output
Blender have a few ways to tell you what's going on:
Info Editor
The Info editor logs executed operators, warnings and error messages. Logged reports can be selected by clicking on them. To select multiple reports, hold down Shift-LMB.
Info Editor — Blender Manual

Python Console Editor
The Python Console is a quick way to execute commands, with access to the entire Python API, command history and auto-complete.
Python Console — Blender Manual

System Console
Menu Window > Toggle System Console, or run Blender via console/terminal.
The Console Window, also called a Terminal, is an operating system text window that displays messages about Blender’s operations, status, and internal errors.
Introduction — Blender Manual
