Here is a break down of apps and their ram usage
View attachment 2365578
Matlab and Zotero and very memory hungry but I do need them
Hope this helps!
Performance is not affected at all!
I think this is a good example of when RAM and system demand differ, because you don't have a RAM problem here, and really you don't have a functional one either, but what you do have is a lot of demand on the system.
If I recall correctly, in simple terms 'Threads' is a measure of data/instructions being actively used by and queued for the processor. The more cores you have, the more can be managed in parallel, but since no system has enough cores for all the things it's doing, instructions and data are being assigned a spot in the queue. Threads is the measure how how many spots in the queue each app is talking.
The queue is cached, and as each spot in the queue is reached, it pulls the data/instruction from cache into RAM to get it ready. The queue and its utilization causes memory pressure, the movement into RAM for execution causes RAM usage, and if the result through-putting the processor requires further attention it will either remain in RAM for fast use, or it will cycle back to cache for holding in the next cycle of the queue.
You have kernel_task, which has a high thread count, and this is a core system process which is known to have issues in some versions of macOS, but yours has a low RAM overhead, so it isn't having a bad day as some users experience, but instead I suspect it's high thread count is that it is having to manage a lot of queuing and prefetching. Thus, unless you were seeing high temperatures and throttling, kernel_task is managing the system as it should.
That screenshot suggests that MATLAB is a bit of an issue, though because you haven't sorted by thread use, it's hard to know if there's something up above it in the list, but with a 1.83GB RAM demand, it looks like this app isn't releasing RAM, so is actively holding the system high in load.
When you're using it, and the memory pressure window shows yellow as before, quit MATLAB as suggested before, and wait a few seconds, then check the memory pressure graph again. If it drops notably, possibly even into the green, then it's simply a bit of a demanding app.
However, memory pressure that you show in the screenshot before is not indicative of a problem. Sustained red would be, but even brief periods in the red wouldn't since the systems is dynamically adjusting all the time.
More RAM wouldn't really actually help you in this situation, because it looks like the system is managing RAM as it should. Adding more would allow the system to hold more threads in memory and not cache in and out so much, but that's assuming the app is well written and behaves properly. Typically, unless the system throttles, it isn't experiencing problems of excess demand. Caching is also not a big deal. The major performance connotations of it with spinning drives creates an aversion to seeing systems do it, but SSDs are way faster so you don't get the same performance penalties.
There are concerns about SSD longevity, but they're seriously overblown.