Try adding SPM to your current path (addpath('/users/andreia/matlab/spm12'), adjust to what you need) before launching. Have you used previous releases and/or Matlab versions without this problem?
SPM was already on my matlab path. Still, removed it and I’ve moved the smp12 folder to C:\Program Files\MATLAB\R2021b\toolbox\smp12 and added it to matlab path again (only the main folder). An osprey window popped up asking to select the SPM-folder path. I did that and then got the same error on matlab.
I’ve used previous releases on my laptop, not sure about which matlab version I used there but now I’m trying to run it on a different machine for the first time.