where did the narrative that the civil war was fought over “states rights” and not slavery come from?

by dannyphantomstan

I sometimes hear that the south left the union because of states rights, and i understand like some tariffs and stuff like that, but most of the tension/conflicts between the north and south was over things like Bleeding Kansas, Missouri Compromise, the acquisition of mexican territory that led to probs about popular sovereignty, the Kansas-Nebraska Act, etc. which all led back to the discussion of slavery. So where did the narrative that the civil war was fought over state’s rights come from?? I get that back then people regarded slaves as property and they had the “right” to take their property wherever they wanted, but is that it? Is there something that i wasnt taught in my AP US History class?? Or is it just a thing that ppl say to make the south seem less racist than it actually was?

Ser_SinAlot