In general, you should keep at least double the amount of RAM in your system empty. If you have a 1 TB drive, and 16 GB RAM, keep at bare minimum 32 GB free. If your system has an SSD, you should keep at least 10% free. If it's a spinning drive, you can go as low as 5% before you start really running in to performance issues. (macOS defragments hard drives automatically - if using an OS that doesn't, more is better.)