The wars of religion is a creation myth for modernity because it’s very much like the Genesis creation myth, where you have chaos and then you have a saviour kind of coming in and restoring order or creating order. And the saviour in this case is the secular nation-state, who kind of pushes religion off to the private.
The thing that’s problematic about that story is that you don’t really have secular nation-states until about 150 years after the end of the so-called wars of religion. What you have at the end of the war is absolutism, and states that enforce one religion, and not secularism in anything like the modern sense.