The aim is to turn letting go into a positive action. Your dog should not see handing an object back as a loss, but as a winning swap.
For your dog to let go, what you offer (a treat or another toy) must be more interesting than what they have in their mouth.
Start playing with your dog (a rope or a tug toy). Once they have the object in their mouth, keep your hands still against your thighs to stop the game.
Present a very tasty treat under their nose without saying anything at first. As soon as they open their mouth to take the treat: “Drop it!” and reward.
Once your dog reliably lets go at the sight of the treat, get ahead of it by saying “Drop it!” just before they open their mouth.
Hold your hand under their jaw. As soon as the object drops into it: praise warmly and give the toy straight back to start another round of play.
Use two balls or two ropes that are exactly the same. Play with the first, ask for a drop, and as soon as your dog complies, throw the second. This stops your dog focusing only on food.
Throw an object, let your dog pick it up, and ask for “Drop it!” before they come back to you. Reward by throwing another reward into the distance.
If your dog takes a sock, do not chase them (it becomes a game for them). Offer a calm swap with an approved toy or a jackpot treat.