How to Auto-Hide Your Dock in MacOS
If you're using macOS Big Sur or later, then you can no longer use the easy keyboard shortcut to auto-hide your dock. See the steps below to find out to toggle on and off auto-hide in macOS. (It's still easy!)
If you're using a macOS prior to Big Sur
You can change this option in System Preferences or you can simply type cmd + option + d from anywhere. This shortcut will toggle your dock between permanently displayed and hidden.
If you're using an older macOS, you could also auto-hide the dock using terminal or remove multiple menu bars and docks.