Recreating gif style figure on Spherical Harmonics read me

I am looking to recreate this figure and was curious what tools were used to generate it, and how the ‘error’ is found/calculated here (MSE?) Thank you!