To unlock the puzzle doors in Hogwarts Legacy, players must assign numbers to the surrounding creatures to complete the displayed sums.