In principle, yes. But unfortunately at least the most recent macOS seems to be an antithesis of better code. Can't believe they've made my M2 Air laggy in basic tasks that even Intel macbooks handled just fine.
Not even my M1 air is laggy... and it has only 8GB RAM. What exactly are you doing?