This guide will let you know how to unlock pets or magical beasts in Hogwarts Legacy.
They’re called Nab Sac. The first thing you will need to do is follow the main story and you will get the sidequest called Beast Class. Do that Beast class, there’ll be a little mission with a young girl afterwards.
The professor will call you after that mission, saying that Deek is waiting for you in your room. You’ve probably unlocked this room already at this point. He will explain to you how to use the Nab Sac, just capture the creatures, bring them back and then you can pet them and feed them.