How to Hide Recent Apps from Dock on Mac Running macOS Mojave
As mentioned above, your macOS Mojave shows the last three apps you have opened on your device. You can get rid of those recently opened apps by following the steps given below.
Step #1. Click on the Apple menu (the Apple logo from the top left corner of your Mac screen).
Step #2. A drop-down menu will appear; click on System Preferences.
Step #3. Now click on Dock from the System Preferences.
Step #4. Here, you will find many options checked by default; among the options, you will also find Show recent applications in Dock. Finally, uncheck this option of Show recents in Dock.
From now onwards, your recent applications will disappear from the Dock as you won’t see the apps there.
Later on, if you change your mind and wish to see recent applications in Dock, simply go back, follow the steps and check the box “Show recents in Dock.”