How to repair a wire in a light switch box
I can't see the clamp on the NM cable is it plastic or metal? If metal there is probably a screw on the outside you may be able to pull the Phillips screws(s) holding the box in place and move the box to gain access. If plastic you can break It and try, replacing the clamp with a raco "insider" it is a clamp that installs from inside the box quick and easy compared to other types. It looks to short to make a splice,  sometimes you have to open a wall when this happens hopefully you can get enough slack to splice in the box.