I agree with the spirit of this. If you want serious long-form substance that is the product of months or years of careful effort, it's hard to beat a book. Usually the best long-form content I've found online (e.g. [1]) is itself just an excerpt.
Many dead-tree-book libraries also have ebook lending programs. If that's not an option, then there's also Project Gutenberg[0] and the Internet Archive's Open Library [1].
Project Gutenberg lost favour with me when they basically said "U.S. Copyright is the only copyright law that matters on the internet, so screw you Germany" and geoblocked the entire country. This must have felt like such a slap in the face to Germans who ever donated time or money to project Gutenberg. Personally, I had never done that, so I had the luxury of being able to just turn away in bewilderment. I do give money to archive.org though, and sincerely hope they will never pull crap like that.
[1]: https://lithub.com/aneurysm/
I've also become a fan of buying ebooks through the Apple Books app on my phone, if you extend the definition of "online" a bit.