You have to use a Named Selection of Nodes, then use the Named selection to put them in the Boundary Condition.
When you include Y=0 on the nodes on the top and bottom of the vertical frame walls, that will stop the stack from tipping over. The stack is not stable on its own. It might be more stable if the extrusion depth was increased from 5 mm to 10 or 20 mm.