People want to be happy. Once a person's financial needs are more-or-less met, it will be very hard to convince them to leave, even for substantially more pay, if they know their new job will make their lives materially worse for ~8h/day.
Also, a fair bit of device control stuff.
[EDIT] Oh, I just realized that you meant what kind of manager stuff.
It's a bit complicated, but, TL;DR, I insisted on treating each of my team as an individual. I learned about them, understood their personal priorities, learned what type of coding they were best suited for, got them involved in as much of the lifetime of the project as possible (not a little silo).
I also did not burn them out. I actually did stuff that the company HR people wouldn't like, like let them flex hours, and gave them slack, when they were going through personal stuff.
I also never lied to them; or to my bosses. It's entirely possible to keep secrets, without lying.
This would not work for many teams. I was fortunate, for having the types of employees that I did, and my company basically supported me, and gave me a fair bit of agency.
I had to work quite hard to make the team a pleasure to work at.
It seemed to have worked. When they finally rolled up US engineering, 27 years after I joined, the employee with the least tenure had a decade.
These weren't losers. They were highly experienced C++ image processing pipeline engineers.
Good managers make a difference.