Crashing Unity improves ram usage in Windows 11

After I crashed Unity by maxing out the ram by crating as many spheres as possible the screen went on and off multiple times which then the performence of ram improved. Now Instead of using 8 it uses 4 which is even lower than when booted which is at 6 gb. Firefox, vscode and unity were open. I tried to repeat it today, but the screen didn’t flash and when opening vscode, unity and firefox the ram increased like usual. Why?? If Windows 11 can work with 4gb ram with these 3 open than why does it use so much??

P.S This is todays screenshot. Should have taken it yesterday sorry((

RAM usage is not constant or deterministic. Plenty of things could alter memory usage, from memory leaks when running an app for a long time or temporary background processing down to caching where memory is marked as reusable by the OS (no longer in use by the application) but the memory is not actually freed because the exact same content may be requested again.

Lastly, Task Manager has to somehow make sense of this all, make assumptions, simplifications. Meaning it does not portray the entire, ultimate truth about memory usage and should be taken with a grain of salt.