Do it right, and you could create harmony in the office for ever.
Most managers will feel out of their depth some of the time. That panic might manifest in erratic behaviour. By understanding how to alleviate your boss's insecurities, you can help them, while making yourself indispensable.
Three things to try.
1. Reframe conflicts as collaborations. If your manager does things you can't stand, you need to address that, but don't phrase it as an attack. If they are terrible at giving instructions, explain that you're seeking clear goals and you'd love their help. And if your manager is great, praise them to others.
2. Follow the 'no surprises' rule. Avoid awkward communication breakdowns by scheduling in a regular ritual: perhaps have a weekly meeting where you update each other, or an end-of-day email in which you keep them briefed with any developments.
3. Don't be afraid to push back. If you say yes to everything, even their bad ideas, you won't win any respect, a good employee knows when to tell uncomfortable truths. But don't be difficult, raise objections when you feel you must, but be sure to offer alternative ways forward when you do.
Practical advice from Oliver Burkeman, author of "The Antidote", in a Psychologies Magazine article on how to improve your work life.