Light switch shorted; can't figure out why
Looking at that old cloth insulation I would guess a short in the box developed when you pushed everything back in, it worked so you know you wired it correctly.

With the breaker off, pull the switch back out, you can wrap the cloth with electrical tape but I prefer heat shrink tubing, I usually carry it to make repairs for cases like this, slip it on and heat and it is much easier to work with than tape wrapped wire. But you probably have a roll of electrical tape, and that will insulate the wire.