How much RAM I actually need?

I have the cheapest (8GB) Macbook Air M3 and other than streaming or browsing, I've been doing light iOS coding for side-gig for some months. Since doing that, I've noticed some lag particularly when running the Simulator.

Now I figured I probably need more RAM, since I see that my memory usage is around 7GB and I think that Xcode 16 (the one that came with code prediction) is heavier to run compared to Xcode 15 (the one I started with).

With the new M4 Macbook Air released, I'm considering upgrading just to get more RAM, but how much RAM I actually need? 16GB for sure, but do I need 24 or does it not worth the price? If anyone can tell me how to check/calculate it or has similar experience, it would be great 🙏🏻

I watched some video saying that 24GB hurts resale price since normal users won't usually buy it. That's why I have this dilemma 😵‍💫

Please help!

(not considering Macbook Pro since it's a side gig and I prefer lighter and cheaper Macbook Air)