Creating a "bubble" UI layout like used in the Apple Music app

I've been thinking about experimenting with a layout like the one used in the Apple Music app on iOS.

The interface is the "bubble" interface that is used to choose your preferences etc...

enter image description here

But I don't really know where to even start with this. Is there a name for the general idea of creating these sort of semi-physics based layouts?

Would love to know what it is I need to search for in order to learn how these work.

I'd be writing it on iOS in Swift but looking more for the name of this sort of interface so I can learn the principals behind creating it.

Thanks