I’d say 4GB of RAM is barely enough. It’ll probably do for the things you mentioned. But opening a browser and surfing the web, or using modern Electron apps/software will quickly get you to the limit.
Another idea would be buying something second-hand / refurbished. It’ll get you better specs for roughly the same money. But probably not a Surface or a tablet, so YMMV with that approach.