Did you confirm that these applications remain in your /Applications folder, or are they missing there too. Dock icons are simply aliases that point to the original application, and removing the Dock icons has no effect on the installed application. If the installed applications are in /Applications, just drag and drop them on the Dock.
If Pages, Numbers, and Keynote are missing from /Applications, and you previously installed them from the Mac App Store, then do the following:
- Launch the Mac App Store and sign in with the same Apple ID as you used to install these applications last time.
- Press cmd+0 (zero) to open the Purchased panel.
- Click the Update/Install button next to the application (e.g. Pages, Numbers, Keynote).
- Do not click Canel on the one or two dialogs that may appear.
- If a dialog offers to install the last compatible version of the application for Mojave, then do that.