There is a famous painting in which someone is being operated on to remove the Stone of Folly https://en.wikipedia.org/wiki/Stone_of_madness. I wonder how plausible it is that someone who exhibited cognitive difficulties due to pressure from a tumor, perhaps one so large that it deformed the skull (not sure if that can happen) and this suggested that cutting into the head might be indicated and perhaps sometimes, assuming the patient did not die, some improvement was indeed observed because the pressure was relieved.
Trephination has an ancient history. In the right hands, it may have been a useful tool to deal with depressed skull fractures and subdural hematomas. Many of the patients did survive, rather amazingly when one considers it is at least nominally brain surgery done in 6500 B.C. (Also note that many ancient cultures, armed with opium, nightshade, cannabis, and more dubious agents, were more skilled with anaesthesia than witch-fearing Medieval Europe)
A subdural hematoma is a somewhat solid object (which is to say, clotted blood) not otherwise found in the body, which can cause strange symptoms (Richard Feynman told a great story). You can see from this set of images of a modern trephination that the operation essentially consists of the removal of a solid, unwanted body (panel E) that could cause behavioral symptoms. One can argue this way it ought to have been counted as a "stone of madness", but proving that point historically is another matter.