How could I make the Roblox Uno card UI?

I would like to replicate the system used in Roblox Uno where cards are automatically centered on the screen and will shrink when there are enough of them. I would also like to know how to make SurfaceGuis line up like a UI Layout as shown in the picture. I wasn’t sure how this was done, so I would like some help with that. Thanks!

Please let me know if this is in the wrong topic

just put a ui container and have the alignment be the center

But will the children of it shrink when there are enough?

try using horizontal, grid or list layout.
use frame as the main container