Solution 1:
Go to System Preferences > Mission Control and make sure that "Automatically rearrange spaces based on recent use" is not ticked.
Go to System Preferences > Mission Control and make sure that "Automatically rearrange spaces based on recent use" is not ticked.