In the Activity Monitor display, Memory Used is memory that is really being used. Cached Files shows the amount of free RAM that is being put to work caching data. The theory is that if the cached data is needed before the RAM is, the Mac will get a performance boost from not having to wait for a slow (by RAM standards) SSD or HDD to load the data into RAM. If the demand for RAM comes first, the Mac dumps some of the cached data to free some RAM.
Here, the Mac was
- Using 16.40 GB of RAM
- Putting 6.62 GB of "unused" RAM to work holding cached files
- Letting 0.98 GB of "unused" RAM sit there idle, doing nothing at all
24 GB was plenty for what you were doing at the time you took the screenshot.
I would not conclude from that that 16 GB would necessarily be enough for all the workloads you might run on a new machine. I certainly would not advise you to buy a machine with 8 GB of RAM when there's a good chance that you would overload the memory system by 100% or more.