i still don't get why some games have only like 800MB size in disk but take 9GB in the ram
Asset decompression and poor layering for displaying images resulting in tons of duplicates in main memory is my guess.
What you see as one image is often many images stacked on top of one another especially when displayed as moving parts. All those assets require processing power to compute, both as position vectors and as image renders, fast memory (RAM) to calculate positions on the fly, and system memory to store assets not in use... still shouldn't be as bad as what it is though.
I have a suspicion that part of the problem is that rather than using 2D render the dev set it to 3D mode in unity and then had the CPU do the renders rather than the GPU along with doing a full asset dump to main memory rather on the fly decompression with that workload being done via GPU (something GPU's were explicitly created to do); it would explain the odd lag and why the large memory use for a 2D game.
Would love to get the source code for this, I have only ever used Unreal so I don't know how much freedom Unity gives in terms of setting up processing but I have a feeling a good bit of the problems could be fixed or at least reduced with a settings change.