macOS Mojave has a feature called Optimized Storage. It frees up space when your Mac starts getting full by storing infrequently used items in iCloud and reminding you to delete used app installers, and even clearing out duplicate downloads, caches, logs and more. It’s pretty handy. If you wish to use it, here’s how:
Click the Apple logo in the top-left side of the screen, and click the About This Mac option.
After the window opens, select the Storage tab to view your storage setup.
Click the Manage button on the right-hand side.
Optimized Storage presents four different options: Store in iCloud, which moves photos and videos to iCloud to save room on your Mac; Optimize Storage, which removes previously-viewed movies and TV shows; Erase Trash Automatically, which automatically empties your Trash after a file has been there for 30 days; and Reduce Clutter, which lets you review and delete older documents — a bit like various third-party app cleaners.
By the way, you’ll only want to choose Store in iCloud if you’re paying Apple for extra iCloud storage (or plan to). The 5GB the company gives for free fill up VERY quickly.
(This how-to is based on my experiences and info on Apple's support pages — where the images sometimes come from.)