Confused about RAM usage after opening and closing programs

Hello, I’m new to endeavour and arch, and I’m wondering if my RAM usage situation is normal, since I know the way linux handles RAM is different to windows, but I don’t know if this particular case is normal.

I have 16GB of RAM, after booting and logging in, my used RAM is at about 1.6GB, which as far as I know is normal, and isn’t going to cause me any problems. The reulst of running free -m at this point is this (omitted swap memory since I don’t yet have it set up, so all values are always 0):

total        used        free      shared  buff/cache   available 
15312        1511       13345          26         746       13800

When I open an application then close it, a chunk of my available RAM will be taken up even after it’s closed. I’ll use discord and steam as an example. When opening discord, this is the result of free -m:

total        used        free      shared  buff/cache   available 
15312        2315       12246          44        1063       12997

and when I close it:

total        used        free      shared  buff/cache   available 
15312        1659       12890          27        1057       13652

When I open steam:

total        used        free      shared  buff/cache   available 
15312        2826       10519         107        2362       12485

and when I close it:

total        used        free      shared  buff/cache   available 
15312        1928       11400          28        2300       13383

after opening then closing them, my available RAM has gone down by ~500mb. I do see the cache has gone up, but I don’t know if in this situation linux would free up the cache to allow for more RAM if anything needed to use it. I don’t have any use cases where I frequently open and close apps like this, but I’m concerned that it’s not normal behaviour. I used linux mint for about 5 months before switching, and I don’t remember it behaving like this. If any extra information is needed please let me know, thank you.

Just for clarification, how do you open and close it?
Do just open and then close the window with that x? Or do you also then go and close the applet in the Taskbar, as both steam and discord continue to run in the background, unless you disabled this behavior in the settings of the program itself. Because in this case a few hundred megabites would be normal as “leftover” as it still runs in the background

I open them through taskbar shortcuts, and close them fully so they aren’t running in the background. For discord I right click the icon in the bottom right of the taskbar and click Quit Discord, for steam I go to the menu in the top left of the window, and click Exit.

It appears to be normal to me. Memory management is something very complex, with multiple aspects, optimization, virtual memory, cache (in case you reopen the same, you may notice it is faster for example). If some RAM is required, cache will be cleared for sure, or move to disk (swap).

The best advice I can give you is to let the system manage memory as it does, unless you identify a specific issue, like a memory leak… which may come from the app itself. Very clever people have been elaborating memory management, and this has been working for years.