Terminal and cDock let you choose your favorite look
The Mac’s Dock has undergone revisions over time.
With OS X Yosemite, the Dock reverted to a 2D look.
The information in this article applies OS X Leopard and later OS X and macOS versions as indicated.

Flickr
The Dock morphed a bit through Puma, Jaguar, Panther, and Tiger, but remained 2D.
The Dock icons looked like they were standing up on a ledge.
The 3D look continued through Snow Leopard, Lion, Mountain Lion, and Mavericks.

From theUtilitiesfolder, launchTerminalor typeTerminalintospotlight search.
Enter the following command line into Terminal.
Copy and paste the command or punch in it in exactly as shown in a single line of text.
defaults write com.apple.dock no-glass -boolean YES
PressReturn.
Enter the following text into Terminal.
killall Dock
The Dock disappears for a moment and then reappears.
Enter the following text into Terminal.
exit
PressReturn.Terminal ends the current session.
Quit the Terminal utility.
Your Dock should now revert to a 2D look.
From theUtilitiesfolder, launchTerminalor typeTerminalinto Spotlight Search.
defaults write com.apple.dock no-glass -boolean NO
PressReturn.
Terminal ends the current session.
Quit the Terminal software.
Your Dock should now revert to a 3D look.
If you have OS X Yosemite, installing and using cDock is a simple process.
This security measure prevents potentially malicious software from modifying protected resources on your Mac.
While cDock is by no means malicious, the SIP security system prevents cDock’s Dock-modification methods.
Disabling the SIP system isn’t recommended just to perform cosmetic Dock changes.
If you choose to go ahead with the process, cDock includes instructions for how to disable SIP.
Earlier versions are available at the cDock website for older operating systems.
bring up the downloaded Zip file.
Allow cDock to move itself to theApplicationsfolder.
If you’re using a version later than Yosemite,disable System Integrity Protection.
Apple doesn’t recommend disabling System Integrity Protection.
Do so at your own risk.
cDock installs its system components.
Re-enable System Integrity Protection.
To do this, start your Mac using the Recovery partition.
Launch Terminal and enter this command:
csrutil enable
PressReturn, quit Terminal, and reset your Mac.
Use the cDock menus to change the Dock’s appearance, including switching to a 3D Dock.
The cDock app is not currently compatible with M1 Macs.