First, the App Store will not allow a download that, when expanded, would leave less than the minimum amount of available space on the startup volume that Apple considers necessary, which is about 9 GB. The download is a compressed archive that will usually expand to about twice its size. Both the archive and the expanded files will be present at the same time, so the actual amount of space needed is about three times the size of the archive.
If you're trying to add a large amount of data all at once, and you get an alert of insufficient space, then from the menu bar, select
▹ System Preferences... ▹ Time Machine
If there is a closed padlock icon in the lower left corner of the preference pane, click it to unlock the settings and authenticate. Turn Time Machine OFF, then back ON. Close the window.
Restart the computer. Test.