There was nothing indirect about it. The direct reason was slavery. Slavery was federal law. It was not state law in every state, and the Confederate states did not want to stay in the union if the federal government wasn’t going to enforce slavery in states that had abolitionist state laws. The federal government was not trying to tell Conferates that they had to free their slaves, so the Confederates were not on the states’ rights side of the slavery issue when they attempted to secede. They opposed states rights to abolish slavery.
When they seceded, they used, in part, the argument that states had the right to secede from the union. They did not, and we fought a big war over it.
Ask yourself this though, if the debate were over something like, the right to own a platypus, instead of the right to own a person, do you think there would have been a war? Of course not, because it wasn’t about what was or wasn’t written down or any technicality, it was about slavery. It would have been the same outcome no matter what the law said because at the end of the day some people wanted slaves, and other found the practice abhorrent - it was a fatal flaw baked into the founding of the country. And as the scales began to tip against the slave holders they found whatever reasons/excuses/whatever they needed to to retain their power