Hello Amanda, for it to work you should use groups for the expanded / minimized states, and not (only) components. Stacks will only work while editing the document. They will not get applied dynamically in the prototype. You can only use them for consistency in the spacing when making the different states. Because of this, you will have 1 state for each possible scenario - 1 open, 2, 3 & 4 closed, then 2 open, 1, 3 & 4 closed, and so on, for a total of 5 states (including all closed) to get it all working.
Please check out my reply in this thread, to see how to apply the stack and set up the accordion tabs correctly with component states. It's a bit tricky to explain and set up. Also, here's another one I made awhile back for another user, with a bit more complicated example. Hope it helps!