Imo, infinite scroll is for when you don’t care about ever finding something more than once while scrolling - instagram and TikTok are prime examples of this.
Pagination is the opposite - you have a set of data you want to be able to reliably navigate.
The bit about pagination taking up precious screen real-estate is silly, especially in light of the IS example having a whole search bar (I’m assuming the paginated example has an implied search bar but it’s not mentioned). Pagination doesn’t need to take up much space at all - whether your choice of pagination implementation is good for UX is a different beast.
Before you would easily go to see pages at random far positions. With infinite scroll there is this frustration of not reaching a bottom and after a few times scrolling and waiting for data to load, you give up, and never go past the fifty or hundred last entries at most.
It has its place.
e.g., the blog allows you to manually indicate a point on the index, but otherwise you "are" always at the top.