Right click on a column name, as you do to hide a single column, but choose "Organize Columns..." instead.
Click "Deselect All" (The Select All and Deselect All buttons only appear if you have a lot of columns, otherwise you have to untick them individually).
IMPORTANT: Tick at least one column back on.
Click OK.
If you don't tick one column back on then you can not get any columns back:
How to show hidden columns in QGIS 3.6.1 (?)
At least until the fix is live:
https://github.com/qgis/QGIS/pull/33918
Update:
Fix has been merged into Master, so should be in the next version of QGIS 3.14. Should be backported into 3.10 LTR, and possibly 3.12.