Sorry for the rant. I'm sure the documentation is instantly understandable by people that use Class and Object and other C++ / OOPS constructs every day.
But I don't even though I have used plain C and a dozens of other languages for 50 years.
tcMenu can't solve everyone's problems, and we don't pretend that it does. Using the library assumes a full understanding of OO, we cannot provide that here.
As per the last message, the return value will be a pointer to a type extending from MenuItem. In the menu types documentation (linked in the last reply) each type is documented fully, theres is also full reference documentation linked from the tcMenu project page, this shows the hierarchy of menu items.
As an example, if you wanted to deal with an AnalogMenuItem you would do:
AnalogMenuItem* analogItem = reinterpret_cast<AnalogMenuItem*>(getMenuItemById(myId));
For text menu item, that would be TextMenuItem instead of AnalogMenuitem.
MenuItem types:
https://www.thecoderscorner.com/ref-docs/tcmenu/html/class_menu_item.html
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menu-item-types/editabletext-menu-item/
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menu-item-types/
Making the IDs changeable after initialization will not be possible as they are treated as immutable data by the API, rendering classes and also remote interfaces. However, you can add extra items at runtime yourself. Many examples add an extra item to an existing menu.