I’m trying to create a horned creature that uses its head to head-butt much like a ram, but I’m curious about what kind of evolutionary trait would need to come about to greatly reduce the chance for brain injury. Any ideas?
Put the Brain Somewhere Else
It's convenient to put sensory organs and whatnot on an extended bit of the body. You could even justify protecting them with enough bone or armour to eventually turn the extended bit into a battering ram. But, like the octopus, your critter doesn't put all of its neurons in one basket.
A relatively small sensory processing unit is located adjacent to the eyes/ears/what have you. The remainder of the brain is spread out along the dorsal surface of the animal, in an enlarged spinal column.
Evolution is unlikely to arrive at this solution, since putting all one's eggs in one basket is often a winning strategy if you pick the right basket (and the ones who pick the wrong ones don't stick around to be tallied). But it's a big universe.
Look after the woodpecker
Woodpeckers are incredibles animals able to stand a 1000 g force of deceleration with their skull. This article will give you plenty of idea on how an animal can protect its brain :
For tetrapod physiology
I like the idea in the previous answer of putting the brain somewhere else or decentralizing it, but this seems more relevant to invertebrates and I think that the presence of a head with horns implies that the brain is there. So I will assume you're going with basic tetrapod (land vertebrate) physiology.
Rams have very thick skulls and it's said that they increase the amount of blood to their brains when ramming to create a "bubble-wrap" effect. https://www.smithsonianmag.com/science-nature/ten-fun-facts-about-rams-animal-180971375/#:~:text=Generally%20speaking%2C%20rams%20have%20really,effect%2C%20as%20they%20call%20it.
Pachycephalosaurs (head-butting dinosaurs) could have skulls over 20cm thick so thick skulls are the way to go.
But, if you wanted to add a bit extra, you could assume that like axolotls, they can regenerate damaged parts of their brain. https://www.nature.com/articles/s41684-022-01063-3#:~:text=Contrary%20to%20humans%20and%20other,model%20for%20studying%20brain%20regeneration.
hope it helps!
A denser fluid surrounding the brain, multiple layers of bone (potentially with layers of the denser fluid in between), thicker and / or stronger bone material like a biological kevlar weave, would all help better protect the brain from damage - this isn't that functionally different from "put it in a safer part of the body".
It's also worth considering that exoskeletons / external patterns of bone ridges could further help keep foreign objects from making it to sensitive areas, in a similar fashion to how armor was designed to make it difficult for someone to reach your vital areas with enough force to cause lethal / lasting damage.
Another potential option would be brain matter that is highly regenerative and / or has enough functional redundancy that the effects of any damage would be minimized, such that even if the brain is damaged, effects such as amnesia or loss of motor functions would be mitigated / negated while the damage is being repaired.
Taking the last concept a little further, after a few minutes without oxygen, our own brains are pretty quick to suffer severe damage / organ death - a mechanism which could produce oxygen from biological reserves to oxygenate brain cells when the level of CO2 in the body begins to trigger our suffocation reflex could help prevent this damage in low-oxygen / suffocation scenarios.
Finally, from an overall structural perspective, it's worth considering where the force is most likely to come from, and what part that might play in how the overall skeletal structure is aligned / has evolved, including whether there are certain positions / angles from which much more force can be applied because it's being distributed better, and vice versa for what would be considered "unnatural" angles.
The brain is actually both- tumorlike ever expanding, and capable to compartionalize and abandon parts of it. Given enough time, damaged brains can share there memory before withering. People can become stumps, all brain and memory, no more parts. Bodyparts with brains in it get weaker. Hunger and exercise can eat the brain up. Damage affects some abilitys. The more distributed the brains are, the slower a person can get. People can split, into personas and fight among themselves.