Is there a way to hide labels from the sidebar?
To hide a label from the sidebar, right-click on it, then select the Hide option:
If you do not see the Hide option in the label menu, it means you pinned all of the labels of your email account to the sidebar.
To hide them, you need to scroll up, click the "..." next to your email account name, then select the Remove option:
This will close all labels of the email account, you can reopen them individually from the + More menu.