

I dunno… getting a PhD just teaches you how to do research. If you want to get a faculty position, there’s a whole other set of skills on top of that; in the US for CS at larger universities it’s mostly about getting funding and becoming “respected” in your field. But you have to tell people that you want to learn those additional skills. That’s the part that’s hard to know about beforehand.
The one “secret” I wish I’d known a lot earlier is that you don’t have to do it alone. In fact, the more you collaborate the more successful you’ll be: more research ideas, more publications, more committee memberships in workshops/conferences, more participating on teams being put together to apply for research funding, more people to reach out to when you’re looking for a job, etc. The most successful scientists I’ve known had huge networks of collaborators.