I earned about $10 for the last quarter for the second edition of a technical book I wrote--which actually earned out royalties. With rare exceptions, writing a book makes basically no sense unless you're on the clock for a company anyway and the book comes with lots of other benefits.
https://www.elysian.press/p/no-one-buys-books