Aside from any downward trend attributable to LLMs, technical book sales were always lower than most people would have imagined.
I've known a few authors who published with O'Reilly and other major publishers and most told me that they made less than minimum wage in the end. There were other benefits, such as increased name recognition and credibility that let them charge more as consultants, but the direct proceeds from writing a technical book seldom paid off even two decades ago.