Scenario 1: You deleted the Safari icon from the Dock, but did not delete the application.
Drag the icon from the Applications folder to anywhere on the left side of the Dock, and drop it there. This will add a Safari icon back to the Dock.
Scenario 2: You moved the Safari application from the Applications folder to another folder.
Search for Safari by using File > Find… in the Finder. Select "Search: This Mac" and set the search terms to be "Kind is Application" + "Name matches Safari". If the Finder locates Safari, you can click on the Safari icon in the "Searching "This Mac"" window. The Finder will then show where Safari is at the bottom of the window.
Go to that place. Open up a second Finder window on the Applications folder. Drag Safari back from its "hiding place" to the Applications folder.
Scenario 3: You deleted the Safari application (and the Mac let you).
Do you have a Time Machine backup or a clone backup of your Mojave startup disk? If so, try restoring a copy of the Safari application from that backup.