Do not use a torch for fixing anything on your frame, you'll ruin the heat treatment. I would find a "clamp-on cable stop" like this:
https://www.rivbike.com/products/clamp-on-cable-stops
If it's shift cable you could try epoxy, that's how golf club heads are attached to the shaft. You need to look up how to clean and prep the area, and clamp it while it cures.