Hard to know, but from what I have read it was his daughter coming out as trans that made him really flip.
I read the account of the daughter and apparently ever since she was a boy at early age Elon was all in denial about it. He kept yelling at him for speaking to light and insisted his boy was gay. Later he has acted as if California school system turned his daughter trans. The signs was always there but he was in denial and when reality went against him he blew gasket.
But of course problems like that are rarely ONE factor. I think God complex is a big part of it too. Look at all successful people. They start thinking they are Gods. I read friends of him remark that he was far more humble before and listened more to experts. But as he got richer he started thinking he knew everything best. Success got to his head.