The most important thing is getting one with apple silicon aka M1 chip or newer. Intel macs are definitely on their way out and won’t get updated for too much longer. And from there, get the newest MacBook Air that fits in your budget. An M1 will definitely be fine, spec wise, but it’ll also be the first to lose support. M2 to M4 will probably break your budget by quite a bit though, even used, but if you find a deal on any of those that fit your budget, go for it. In any case, the base model will do. While I would generally recommend a RAM upgrade (and if you find a model with 16GB for a similar price as an 8GB model, go for it), it’s not necessary for the workload you‘ve described.
Edit: Also, try to take a look at refurbished models, both directly from apple as well as third party refurbishers. The Apple ones are as good as new, including warranty and even third party refurbished models oftentimes come with a year of warranty and you still might save a bit, if you can live with a few small blemishes.