You could use AE’s native Shatter effect to make shapes break apart and fall, but they will not interact with each other or pile up.
For piling things up in AE, I’d suggest a plugin like Newton 3 (original and long-standing 2d physics solver for AE), Physics Now (the newcomer), or maybe Stardust (ridiculously full of features 3d particle engine that does physical simulation as well as volume rendering and a bunch of other stuff).
Or, if you don’t mind stepping outside AE, Adobe’s Character Animator has a fun 2d physics solver in it that could do this too.
Social Media Profiles