Your dog will get excited when you show him a collar and a leash before a walk. The reason he gets excited is that going out with you means a herd movement for him and originally it means hunting. If you take him for a walk while he is excited, he will go first and drag you around, and you will follow him. That's a bad position.
So before you go for a walk, you have to keep your dog calm and make sure that he is obedient. You should convey a message "If you want to go for a walk, you should show obedience, sit down, and stay calm".
Sitting is an obedient behavior for dogs. He will understand that if he doesn't stay calm, he can't put on a collar and won't be able to go out for a walk. And to let him understand, it is important that you stay silent first.
By keeping silent, make him think "How can I put on a collar and a leash?". If you keep doing this repeatedly, the dog will learn that if he stays still, he will be able to put on a collar and go for a walk. Give him a choice and let him think for himself.
It is important to ignore excited dogs before a walk. Many owners say "Calm down and quiet! Sit down!" to an excited dog, but that fuels the excitement of the dog. The more you talk, the more the dog's excitement escalates. Therefore, in order to calm down the excitement of the dog, you should ignore it without saying anything. By continuing to ignore it, the dog's excitement will surely subside.