How much do you agree with Elon Musk statement that non one is going to read your publications?
Well, for starters, Musk is just trolling. I think he does that often enough that people should recognize it for what it is. The statement has a bit of truth and if you exaggerate it enough you get to his statement.
A more accurate portrayal is that most academic publications have a very small audience. Not all, but most. The audience is other specialists in that sub field to which the paper applies. The paper might be very significant to half a dozen people worldwide, but of little interest elsewhere.
Some papers, on the other hand, have a lot of influence. And some of the lesser papers are what eventually enable the big ones.
The publication of his ideas on the Calculus by Leibniz were pretty important and have had a huge impact, and not just on math. Einstein's work has also had a big influence.
If you were to create a graph of the importance of papers vs their numbers, I think it would be pretty skewed. But that is irrelevant if it is the small steps, accumulated over time, that make the big steps possible.
So the &quot;useless&quot; is an exaggeration. And the &quot;nobody&quot; is an exaggeration. The result is just a troll. Smile and enjoy the workmanship of Elon the Showman. But don't neglect your research.
And none of Musk's business ventures would be worth anything without the research that led to the technology they use.
That said, at the moment, it is a pretty poor marketplace for academics. A lot of that is political with too little consideration given to the long term importance of education generally. And, of course, to survive in any competitive environment you have to work hard and get results. If you don't love research and the field you work in, then do something else. The rewards aren't financial for most of us.

To add a personal note. My doctoral dissertation (classical real analysis) was incredibly esoteric, though quite nice in its way. I predicted at the time that no one would ever find a practical use for it. I was wrong, though it took ten years or more before someone found an application. My later work in CS had more of an immediate impact.
And, my gateway into academia wasn't easy to pass through. I graduated at a time when no one wanted to hire mathematicians, since there was a glut due to the race to the moon. My trajectory would have been entirely different had I finished three years earlier. But, life is good. I'm not sorry that I stuck it out.