Try this first: press ⌥⌘D. That toggles auto-hide, and it brings back a Dock that is merely hidden rather than missing.
If that does nothing, work down this page. The causes go from most to least likely, and none of them involve reinstalling anything.
Auto-hide is a single keystroke away and is easy to turn on by accident. Push the pointer firmly into the bottom edge of the screen and hold it there for a second. If the Dock slides up, that is all this was.
defaults write com.apple.dock autohide -bool false; killall Dock
If the Dock takes an age to appear, the delay is set long rather than the Dock being broken:
defaults write com.apple.dock autohide-delay -float 0; killall Dock
On a multi-monitor Mac the Dock belongs to one display at a time, and it moves when your pointer visits the bottom of another one. If you have just unplugged a monitor, the Dock may still consider the missing screen its home.
Move the pointer to the bottom of each screen in turn and hold. To bring it back permanently, push the pointer to the bottom of the display you want and leave it until the Dock arrives. More in keeping the Dock on one screen.
A full-screen window hides the Dock by design. Press Esc or ⌃⌘F to leave full screen, or swipe to another Space. This one catches people out because the Dock is working perfectly, just not where they are looking.
The Dock is a program, and programs stop. macOS will restart it immediately if you ask:
killall Dock
Nothing is lost, no windows close, and your layout is untouched. It is safe to run at any time. If
you get No matching processes, the Dock genuinely was not running and this command has just
started it. Detail in what killall Dock does.
A tilesize of 16 is a strip a few pixels tall at the bottom of the screen, easy to
mistake for nothing at all. Put it back to something normal:
defaults write com.apple.dock tilesize -int 48; killall Dock
If none of the above brings it back, the file macOS reads the Dock from is unreadable. Deleting it makes macOS build a clean one:
defaults delete com.apple.dock; killall Dock
This does throw your pinned apps away. It is the last step for a reason, but it is reliable, and the apps themselves are untouched, only the list of which ones sit in the Dock.
At this point the Dock is not the problem. Restart the Mac, which rules out a stuck window server, and then log into a fresh user account from System Settings › Users & Groups. If the Dock is fine in the new account, the fault is in your account's preferences and step 6 will fix it. If it is missing there too, it is system level and worth talking to Apple about.
Not from macOS.
Nothing in the system records what your Dock looked like before, which is the gap that made us build
Still Dock. If you have a Time Machine backup you can restore
~/Library/Preferences/com.apple.dock.plist from before the problem.
It can happen. Cleaner utilities sometimes remove preference files they judge to be clutter. If the Dock reverts repeatedly, see why the Dock resets itself.
The Dock and the Finder are separate programs. If the Finder is also missing, restart the Mac before doing anything else here; that is a different fault.