Puppy, apostrophes are used for two reasons -omission and possession.
Omission: when two words are shortened into one word^^ and a letter gets left out (omitted). For example - can not to can't
Possession: the apostrophe shows ownership. So if YOU have the hat, it will be Puppy's hat. A good tip to check where you need an apostrophe is to underline exactly who has the item in question.
Sarahs dog. who does the dog belong to? Sarah's dog. (The apostrophe goes after the underlining.)
Johns cat. who does the cat belong to? John. So the apostrophe goes after the *n
*
It feels complicated when plurals get involved, but the same rule works.
If you had ONE dog, and your dog had a bed, it would look like this: my dog's bed.
If you had TWO dogs and they shared a bed, it would look like this: who does the bed belong to? My dogs. Underline it: my dogs bed. So the apostrophe goes after the s- my dogs' bed.