This answer should be considered together with the other answers on this page. Based on my own experience as a PhD student in an engineering field, here are some of the most important traits that a PhD supervisor should have:
1. Collaborates at a higher rate with their PhD students than with colleagues at their own level.
This, in my opinion, is by far the most important metric. What this trait means is that the PhD supervisor is able to consistently publish work with their own PhD students rather than with other professors or postdocs at their level. I've found that PhD supervisors who mostly publish with colleagues and not PhD students are often difficult to work with (e.g. does not provide reasonable guidance and/or micromanages you).
A possible reason for this is that, when working with colleagues, PhD supervisors tend to suppress their unproductive qualities (such as micromanagement), since they do not wield the same power over their colleagues as they do over their PhD students. Therefore, they are "forced" to compromise with their colleagues to work more towards their and their colleagues' common objective of doing good work.
However, when working with PhD students, their unproductive qualities often show up more, which could lead to a difficult time for the PhD student. That is, with PhD students, they let their unproductive qualities stand in the way of doing good work with their PhD students. The truth is, even with PhD students, some compromise is required in order to do good work, and micromanagement will work against this.
To determine whether a potential PhD supervisor collaborates at a higher rate with PhD students, check their Google Scholar profile to make sure that they publish mostly with PhD students rather than colleagues at their same level. That is, the proportion of papers co-authored with students should be high compared to the proportion of papers co-authored with colleagues at the same level. This supports their competency at mentoring PhD students. You can use an Excel spreadsheet to keep track of this, and, ideally, the proportion of papers published with PhD students should be at least 50-60%.
2. Once it has been established that the potential PhD supervisor publishes consistently with PhD students rather than colleagues, make sure that the difference in quality between papers co-authored with PhD students and papers co-authored with colleagues is not substantial.
If the difference in quality is significant, then it could mean that the potential PhD supervisor cannot properly mentor a PhD student, since they are not able to train them to be able to publish papers of the same quality as the ones that they publish with their colleagues.
Of course, some difference in quality is expected when a PhD student is just starting their degree, but by the end of their degree, the papers that they publish with their PhD supervisor should not be that different, in terms of quality, compared to the papers published with the PhD supervisor's colleagues.
Again, this can be checked from the potential PhD supervisor's Google scholar.
3. Number of PhD students graduated every year.
A good PhD supervisor consistently graduates 1-2 PhD students every year. Of course, this depends on whether the PhD supervisor is in the earlier or later stages of their career.
4. Most number of PhD students concurrently supervised.
A good PhD supervisor should be able to handle a large number (at least 3) of PhD students concurrently. If not, then it could mean that the PhD supervisor has poor people management or time management skills. Of course, this is not a general rule, and exceptions exist.
5. Where their PhD graduates end up.
A good PhD supervisor graduates students who end up working in jobs that you eventually want to pursue. However, in my experience, I've also found that, regardless of where you, the PhD student, wants to end up, where the PhD supervisor's graduates end up can tell a lot about the PhD supervisor.
For example, if most of their graduates end up in industry jobs, then there is not much to say about the PhD supervisor, since it could be the case that they did good research with their PhD student, but the PhD student chose to pursue an industry job.
On the other hand, if their graduates end up in academic jobs (e.g. postdoc or professorship at a university), then one could argue that a necessary condition for this to happen was that the PhD supervisor had to have done good work with their PhD student for the PhD student to get an academic job.
6. Participates in co-supervision as little as possible compared to sole supervision of PhD students.
A good PhD supervisor should be able to supervise PhD students themselves, and not rely on the support of another PhD supervisor to co-supervise a PhD student. Of course, exceptions exist. However, if the PhD supervisor graduates a majority of their PhD students via co-supervision with another PhD supervisor, then it may suggest that the PhD supervisor is not able to properly mentor a PhD student alone, and they may be difficult to work with.
Also, in my experience, co-supervision is difficult to get right, since each co-supervisor can decide to provide as little guidance as possible since they assume that the other co-supervisor will pick up the rest of the work. However, if both co-supervisors do this, then you, the PhD student, will not receive enough guidance and will suffer in the end. Therefore, avoid co-supervision if possible.
7. Diversity of papers.
Although this is not absolutely necessary, it is good to see that a PhD supervisor is able to publish papers of different kinds (e.g. papers with empirical data vs. papers with theoretical derivations). This suggests that they are flexible and are able to contribute to their area using different kinds of skills that you, the PhD student, should be able to learn from them.
8. Last, but certainly not least: when making a decision on who to choose as your PhD supervisor, don't let your emotions fool you.
A potential PhD supervisor who is a good teacher or has a friendly personality may be a terrible PhD supervisor. Therefore, don't rely on the strength of your social connection to a person as a good metric to evaluate their suitability as a PhD supervisor. Instead, use the objective metrics I mentioned above.
In addition to what I wrote above, here are some pieces of general advice:
Tenure-track vs. tenured professor
If a potential supervisor has not been tenured yet (e.g. assistant professors), then they often have more motivation to perform high-quality research than supervisors who are already tenured (e.g. associate professors and above). Moreover, supervisors who have not been tenured yet are often younger, and so are more likely to be more familiar with the latest technologies/research than older tenured supervisors, who have no incentive, other than personal interest, to stay up-to-date.