What are your dog's basic needs?
Everyone has basic needs. We all need to breathe air, eat food, drink water, get enough sleep, etc. Are our dog's needs any different? Well, yes and no. They absolutely need all of these things, but dogs differ from us in terms of basic needs in this way: dog's behavior changes based on the order in which their needs are met.
They act differently if they receive affection before discipline, or discipline before exercise. So, what is the order in which their needs should be met? Exercise, Discipline, Affection (EDA). If you physically and mentally exercise your dog before setting boundaries for them (discipline), they have worked to earn a reward (affection). If they don't work to earn that reward, they don't appreciate that reward and begin to expect it without earning it.
Dogs are pack animals. They are used to working together as a team to achieve a reward (food). Therefore, if we take away this instinctual ritual from them, they are immediately confused. They don't know whether to look to you as their leader or not if you don't provide for their basic needs in their natural order.
So, treating your dog according to his natural basic need progression is vital in positioning yourself as a leader in his mind. If you want to be seen as the leader, respect their instinct by exercising them before disciplining them, and providing both exercise and discipline before giving them affection.