This article explains how to show or hide the Dock using System Preferences, a keyboard shortcut, or a mouse or trackpad, and how to make the Dock smaller on your screen while keeping it visible. The information in this article applies to macOS Big Sur through High Sierra.
How to Hide Dock on MacBook [Tutorial]
Here's how to manage the visibility and performance of your Mac Dock.
From the Apple menu, select System Preferences.
Select the Dock icon. On Big Sur, click Dock & Menu Bar.