Please let me know if there is a type of brain surgery that is used only as a last resort?

Brain surgery. The most common one would likely be a decompressive craniectomy done for the relief of pressure in patients with high intracranial pressures that have not responded to medical treatment.