the problem is that you created a variable of class ‘Sphere Blueprint’ in your widget but didn’t assigned anything to it so basically you are casting a variable with nothing on it.
You must store the spawned sphere object inside the widgets variable before casting it