I have a 1TB and 24GB MacBook Air 13.6-inch M2 and I couldn’t be happier. Ignore the people who say it is a bad idea. I also love never needing to hear a fan. I do video editing etc.M2 15" MacBook Air with 24GB ram and 1/2TO SSD is absolutely not a good deal but nevertheless a wonderful machine. It is that simple. Moneywise, the good deals are the base Macbook pro 14" and the maxed out 16" Macbook pro.
But usage wise, it is totally relevant to have 24GB ram in a Macbook Air if you are a dev who wants a fanless light machine with comfortable screen real estate that runs many VMs for example. And you can find a ton of different usages where one would be more happy with a maxed out Macbook Air than a Macbook Pro.
If you are planing to keep it for 5+ years, think "usage" and not "money". The maxed out Macbook Air is a $cam but if it fits your needs and your workflow, do not buy a macbook pro just because it is a better deal.
If I wanted to run LLMs on my Mac and 3 VMs at the same time, sure, get a pro, but otherwise the Air is faaaaantastic.