I think this glosses over the role of states in the U.S. system. For instance, it's true that gay marriage was legalized nationwide by a court case, but a bunch of states had already legalized gay marriage before that happened. (Though some of that was state courts.) This is also how abortion law works since Dobbs v. Jackson Women's Health; in California, we voted to encode a right to abortion in the state constitution 4 years ago [1].
[1] https://en.wikipedia.org/wiki/2022_California_Proposition_1