Buy second hand books if you can: wider selection, good for the environment, lower price (usually), supports small businesses (usually).
Most of these books are printed before 1990, so I know that no AI was involved, they are normally hardcovers, as those survive better, or are at least taken better care of.
For technical publications though it pretty rough. My go to book store normally have print on demand labeled as such. I don't have the best of luck with print on demand, so I tend to find an alternative.
Secondhand book stores are also usually much more interesting than even good new stores.