“Leave it” is by far one of the most important commands you can begin training to your dog. By training him to leave something alone, you are training him to listen when you tell him something is not ok to eat, smell, bark at, etc. And it isn’t a hard command to teach.
Start by standing just to the side of your dog while he is in a sitting position. You should be facing in the direction that he is looking; you will be tossing the treat out in front of him and you want to be able step in front of him to block the gap between your dog and the treat.
Take something he likes and toss it about 4 feet in front of him (you can use tasty food as well). When he goes for it, simply step in front of him and say “leave it!” Have him sit and then back out of the gap and let him see the reward. Repeat this step until he doesn’t lunge after the reward every time you toss it or move out of the way. When he waits patiently for you to tell him what to do, the release him and tell him he can have it. Many trainers also recommend not allowing him to have that treat and to give him a treat yourself and then pick the one up off the floor.
Repeat this training process and slowly move the treats closer to him until they can be sitting in front of his paws and he will not reach for them unless you say so. At this point, you will have trained your dog to “leave it.” Now you can begin taking him around other objects and working with him on leaving those as well.