It seems that your usage is pretty normal and 16GB would handle it fine. The high RAM usage is an inherent feature of macOS's memory management system which I attempt to describe below, do correct me if I am wrong.
macOS (whose kernel is derived from
Mach kernel) features "
a fully integrated virtual memory system" that is always on. The virtual memory system comprises the physical RAM itself (the expensive ones) and drive storage (also expensive but much cheaper). The memory paging scheme maximises system performance by looking at app profiles and memory usage pattern, then preemptively loads pages (memory blocks) which the apps might use. This usage pattern can be built up over time as you use the app, or the app developers can specify it.
The paging system is configured such that it loads and retains pages in memory. Pages that are recently accessed are marked as active, otherwise they become
inactive. When more memory is required by apps and there are no longer free memory, inactive pages are removed to make way for new active ones. The removal can be a complete purge, or they may be compressed or swapped. The exception is wired memory which is required by the kernel and its data structure, and cannot be paged out. This arrangement maximises system performance since loading data into memory takes much longer than paging existing ones in memory. Hence the adage "unused memory is wasted memory".
The
memory pressure chart in Activity Monitor is the summary of the above interactions. Activity Monitor can indicate "high memory usage" but low on memory pressure, simply because of the qualities described above. Memory pressure turns yellow or red when macOS cannot efficiently use memory (because of high swap/compression-decompression caused by lack of RAM).
I was looking into this to understand my own use case. I use R/Python to wrangle data for data science purposes, which can run into hundreds of GBs. That surely overwhelms the 64GB of RAM on my M1 Max isn't it? However, the operations run fine (just takes a while). This is because most of the data stays on the disk and only a portion of them are operated upon by R (hence marked as active) at any one time. Nonetheless if I look at Activity Monitor, it will indicate R memory usage as 200+GB, but the memory pressure is yellow. It is also interesting to see the spikes in memory pressure into red as certain calculations are being performed, or lookups being matched, so understanding this helps in code optimisation exercises - e.g. deciding when to chunk datasets/operations or use RDBMS's. After the script runs successfully, memory usage will remain high even after explicit object removal and garbage collection commands (i.e. tell R/macOS that the pages are no longer required). When other apps request for pages, R's memory usage will go down as macOS purges the inactive memory to make way for other apps.
Hope that helps!