When Max was a puppy, he loved to playfully nip at my toes first thing in the morning. He thought it was a fun game, but I did not.
When he did this, I put him back in his xpen while I brushed my teeth. He soon learned that if he wanted his freedom, he couldn't bite my toes.
Always be positive, or not harsh in corrections. Just even keeled firm. Use keywords and phrases like "No bite."
Always supervise your puppy and granddaughter closely when they are together. Small children tend to move fast, especially waving hands, which are often targets for nipping. Try to replace the target with appropriate toys.
When it is just you, you can also make a yipping sound when your pup nips. Or say "Ouch, no bite."