...
In the LayerTree header you will find some icons (top right), one of these is a delete icon represented by the trash bin as highlighted below.
Clicking on it enables the delete mode after which the user can delete folders and layers from the LayerTree by clicking on the icon. The items in the LayerTree will be highlighted (in red) on hover.
To disable the delete mode click on the trash bin icon again.
...
In the LayerTree header icons, you will find the edit icon as shown below, clicking on it activates the edit mode.
The items in the LayerTree will be highlighted on hover. The user can edit titles by clicking on existing titles.
Fill out the input field with the new title. The new title is saved by either pressing the enter key on your keyboard or by clicking outside the input field.
Once done, disable the edit mode by clicking on the edit icon again.
...