MATLAB Online is one release newer (R2022a)
MATLAB Online is Linux based, and uses different high-performance Math libraries than PC uses.
It might be the case that you are using matrices that are badly conditioned, but which might be permitted through in your PC but rejected in MATLAB Online.
