Windows 10 can automatically free up disk space and keep it optimized using Storage sense.
It can be configured to automatically delete temporary files and previous Windows versions (which can take up a good chunk of space). Here is how :
Access Settings (Windows key + I) and choose System.
Next, from Storage section, make sure Storage sense is enabled and choose Change how we free up space automatically.
Over here, enable auto deletion of temporary files. The time period can be from never to 60 days (with 30 days as default). Select as needed. Also, leave the Run Storage sense to When windows decides. It too can be changed from every day, week or month but the default setting of Windows deciding is better.
Files in Downloads folder too can be set to be deleted for freeing up space. Lots of downloaded files especially program setups can add to disk usage. The time period for deleting these files can be after a day and till 60 days. Select as needed.
Enable Delete previous versions of Windows to free up significant amount of space. These previous versions are kept for rollbacks but can be deleted.
Finally, select Clean now. Once some space is freed, a tick mark will appear next to it with the amount of free space reclaimed.
All done.