First, click on the Apple logo in your Mac’s menu bar, then click on System Preferences, after that click on Dock and then, click on Automatically hide and show the Dock.