The above 4 cells look fine, while the rest do not fit the screen. You'll notice numerous debugger warnings, saying that "The item width must be less than the width of the UICollectionView …". This reveals the need to constraint cells horizontally and force them to grow in height.
The object-fit CSS property sets how the content of a replaced element, such as an or , should be resized to fit its container. The replaced content is scaled to maintain its aspect ratio while fitting within the element's content box.