One or two years ago, I have tried to run a recent macOS on a Macbook air 11" from 2011, 4GB of ram, it was just unbearable, any actions would take seconds, I wonder if it is still problematic.
8 GB RAM is the baseline for modern macOS. It really doesn’t like being forced to do with less, even if the 4 gb macbooks are not that old (4 gb airs were sold until 2016).
People keep nagging apple to up the baseline RAM from 8 to 12 or 16 on the new machines, but given how the 4 to 8 jump played out it would probably quickly make that vast sea of soldered 8 gb machines incapable of running newer macOS versions well.
Depends which version you tried to run, the MacBooks without metal graphics are really bad on modern OSes, but they have made a lot of progress with the patches.