Outdated documentation
The latest documentation was moved to docs.qfield.org
First, you should to verify if the plugin Invisible layers and groups is installed, if you don’t have installed, you can do it going to Plugins > Manage and install plugins > find Invisible layers and groups > click in install plugin.
When you finish the installation of the plugin, you will see in the QGIS interface this buttons:
Once the installation process is finished, it is possible to start hiding the nodes of the legend our project.
Note: If you want to see the hidden layers/groups again, click on show invisible layers and groups.