If only there was a national (or global) digital library of ebooks.
There are several, if the various shadow libraries (Library Genesis, Z-Library, Anna's Archive...) count.
Really? What library are you using? Virtually all of them will arrange to have the book you want sent from a partner library.
But I've lived places that had inter-library book loans before, and there were still cases where none of the libraries in the system had a book.
I had assumed this would be an imposition and I could handle searching myself. However, good librarians can work magic, whether it’s finding the same material in another format, arranging a loan, or even buying it outright.
The ones I know also assure me this is one of the fun parts of their jobs!