macos – It says I’v got about 3 GB and it won’t let me download something for 2.2 GB. Why is it saying this and how do I successfully download it?

It says I’ve got about 3 GB on my mac but when I try to get something that takes 2.2 GB it says I do not have enough room on my Mac. I am using an Apple Macintosh Macbook Air
Version: 10.15.7
It’s also a macOS Catalina

How can I check space before I download to I can avoid errors?