Everything cant be accomplished by endless scrolling.
Thats why people like me want pagination, my desktop isnt a phone.
Two issues of top of my head, is scrolling endlessly can lead to large resource usage as the page size just keeps growing and what happens if you want to skip to e.g.l page 50 without pagination?
Practical example, search for something, do maybe 5 page scroll cycles (equivalent of page 5 pagination) then load a link, click back, you not back to where you were but instead start of scroll, on pagination you back to the page you was on. Pagination is just flat out superior hence it was the logical evolution of desktop UI design, infinite scroll was developed for phones with devs then not wanting to maintain two UI's dumping it on desktop users.
Youtube search is awful now with no pagination, gave up on it once they dumped it. Try finding oldest video from a youtuber with 1000s of videos easily without pagination and now without the order by oldest first option which also got removed.
PDF method might be a reasonable compromise, it combines pagination with infinite scrolling, as most office type apps do. So if a browser auto changed its URL allowing you to skip back to where you are as it scrolls, and to manage resource usage actively shrink the page, I have seen some websites work by when you scroll down it just loads next page so pagination controlled via scrolling (or click), thats probably the best hybrid solution on the web.