No, it's unrelated to war weariness (although actions that cause enemy war weariness are likely to also increase your war score). War score is an AI variable that determines how well you're doing in a war against someone else, and influences how the AI behaves in peace negotiations. You mainly get it by defeating enemy units and conquering their cities.
In a bit more detail, I calculate the percentage of war score generated by you in every war. So for instance, a war in which both have a war score of 20 you have 20 / (20+20) = 50%, if you have 30 and your enemy 20, the result is 30 / (30+20) = 60% and so on. You receive positive stability when being over 50% (up to a maximum of +10 for 100%) and negative stability when being below 50% (up to a maximum of -25 for 0%).
Positive stability scales linearly with your war score above 50%. War score below 50% has a
logistic scaling, which means that negative war score grows faster than linear in the 25-50% range and slower than linear in the 0-25% range.