My trick was searching +"index of" on Google or something like that, I could find all sorts of books that way. What were your tricks?
These days, Libgen is much more convenient.
With that said, I personally prefer buying an official book if available, so that the author can get their royalties. Many publishers even offer DRM-free ebooks.