a trick I use to get dogs to stop biting is I jam my finger in the corner of their mouth and force their gums between their own teeth so when they bite down they are biting themselves and realize it creates pain, works really well.
Good tip for puppies.
Good way to teach a stubborn dog to release an object, as well.
You start with that and then switch to substitution, later.
as a small kid, my dad taught me that first thing when we got a pup from one of his friends...works every time, especially in getting something out of the dogs mouth that he shouldn’t be chewing on...He had a hunting dog in the back yard, I was to stay away from her, she was trained for hunting and wasn’t allowed in the house...She never did bit or snap at anyone, but she had one job, hunting pheasants and small game.