I think it depends on the child’s ability to adapt. Also depends on the surrounding support system.
My parents moved by older bro and I from Huntington beach to philly suburbs when I was 9 and my brother was 13. Prior to our move, I was loving school, life etc. My brother was not loving it, as he was in special Gate programs (excelling scholastically but maybe not socially). When we moved, I hated it there and it took me about 5 years to like it. My brother on the other hand was in his element there, loved it and he has never left.
I told my wife that i wouldnt do that to our kids so I said if we are going to make a move its going to have to be before the eldest starts gradeschool.