In Gmail on the top left side of the page you will see 3 lines/bars, click the lines to hide panels on the left side (they will be reduced to small icons.). Click on the lines again to unhide the panels.
Then on the right side of the page at the bottom you will see a small arrow (>), click the arrow to hide the panels on the right side, click again to unhide them.
Here is a link to a short YouTube video on how to do it.
How to hide and unhide Gmail side panels #gmail #shorts #gmailhacks