If you have three objects, the trunk, the branches and the leafs, in order to hide an object (with H on the keyboard) you need to have said object selected. So if you select the trunk and press H, the trunk will be hidden but the other two objects will remain in view. If you want to hide all three objects you need to have all three of them selected. You can also toggle the eye icon in the Outliner for each object. Alternatively, you can put all three objects in a collection and just hide the collection for all the objects in it to go away.