Jimmy Gunawan uses Simulation Nodes to stack randomly sized boxes with a bit of logic in Blender.
Blender Sushi Jimmy Gunawan posts another Blender Geometry Nodes tutorial that uses the new Simulation Nodes. Using a Simulation Zone, Gunawan shows how to make a simple setup that stacks randomly sized boxes.
The setup uses a Bounding Box, finds the box’s height, and then stacks the next generated box on top of the previous one.
Blender’s Simulation Nodes work with “simulation zones” that you can use to create custom physics sims procedurally. “Simulation zones allow the result of one frame to influence the next,” an important concept for this box stacking setup.