With iOS 13 Apple introduced a new and very powerful way of creating layouts for UICollectionView - UICollectionViewCompositionalLayout.
The compositional layout uses three types of "building blocks":
- item - describes properties of the actual cell that will be displayed
- group - group can have one or more subitems