While you generally use heat on the nut, it does work on stuck bolts in thicker material. It's called 'constrained expansion'.
When the bolt is heated, it expands. Since the shaft of the bolt is constrained, it can't expand inside the hole. As the bolt cools, it contracts. The contraction, however, is not constrained. This means that the bolt can shrink in all directions, making the bolt slightly smaller. Once the bolt has cooled, it should be smaller and easier to extract.
I've used heat on hundreds of stuck bolts over the past 4 decades with great results.
FYI: Most users here are not "good welders' nor do they have a TIG setup or materials laying around the garage. My bro is welder by trade and owns a mobile welding side business as well. I'm sure he could do that, but your average backyard mechanic likely can't, nor do they have the gear. Of course, some here are not your average backyard mechanic, either. It certainly is a good approach if you can do it and have the tools.