That is an example of Personification
Personification because a teddy bear can't actually do that
"My teddy bear gave me a hug" is an example of personification because it attributes a human action (giving a hug) to a non-human object (the teddy bear), enhancing the emotional context of the sentence.
;