The first time I was in a leadership role, I struggled very much to understand the unwanted consequences of what a leader says and does.
The illusion is often that you can still behave like a peer, or a friend.
Yet people will look for direction, not for jokes. They will look for reassurance, not for stress. They will look for development, not for undirected and generic feedback.
Grasp this soon when you become a leader, and understand that your words and actions are now under a different type of scrutiny. The whole team will benefit from it.