I prefer to buy eBooks directly from the author, with a fallback to sites like leanpub.
The process sucks though: you typically get a zip, which contains .epub, .mobi, and .pdf. And the naming is bogus, with spaces sometimes replaced by underscores or hyphens, and sometimes with the author's name and sometimes not. So you have to unzip the file, get the contents, decide whether to keep them all or not, move them somewhere else, and then have your reader(s) realize that they're there, and try not to get dupes in the "shelf" view, and deal with the crappy metadata, and, and, and ...
It'd be super nice if we got some standards here! It's not like Amazon has to adopt them -- they're a separate ecosystem. But if all the "indie" eBook publishers did the same thing, the reader apps could make this so much less painful.
Kobo and Google Play Books also offer DRM-free books, but you have to look at the book details (further down the book page) to see this information.
[1] https://libreture.com/bookshops/
(free) archiveofourown.org
(free) tthfanfic.org
(paid) https://www.humblebundle.com/books
(paid) https://www.fanatical.com/en/bundle/books
Tons more...
I usually check to see if the publisher sells the e-book directly. If so, I will consider buying there. Usually amazon has a cheaper price, and I buy from them and strip the DRM.
If you download your book from Amazon to your disk e.g. in Calibre Amazon can't touch it.
I have many amazon books and I read then in pub based readers on my iPhone.
Even on the Kindle I think I am safe as I tend not to use the Amazon link but upload via Calibre so what is on the Kindle does not match what Amazon thinks I have on the Kindle.