in the past i have had success finding cheap second hand books using this search engine: https://www.gettextbooks.com/
e.g. i have my eye on a new Peter Watts book, here we go: https://www.gettextbooks.com/isbn/9781616962524/
I'll second using local libraries. They are really a terrific resource. Between hard copies, ebooks, digital copies, and inter-library loans, it's really rare I can't get my hands on a book I want.
Also, in abebooks.com you can sometimes find textbooks at much lower prices, even if you include the shipping fees compared to amazon/bookdepository. Most likely these textbooks are much cheaper because they are supposed to be sold only in India. Still, some sellers ship them all over the world.
You can find a multitude of free and new books on b-ok.org, but I guess it would be illegal to use in most jurisdictions.
Lastly, wherever I've bought a book from, I always refer to Amazon.com for reviews.
I'm learning to check there first to see if that "new shiny" book is there first.