You'll find a lot of friendly characters and creatures in Hogwarts Legacy. However, some of them are hostile, and that's the case with goblins.
The fact that they are so important to the game's plot will require you to learn more about them. The quest associated with them is also important because it will allow you to learn the spell Petrificus Totalus to petrify your foes.
You'll be asked to investigate the "Goblin Presence" at some point in 'Percival Rackham's Trial.' To complete this quest, players must have reached level 11.
How to Finish Percival Rachham's Trial in Hogwarts Legacy while Investigating the Goblin Presence
To complete the quest, go to the ruin indicated on your map. Look around you and you'll see a large tent near pillars in ruins. The item you're looking for is hidden there.
A letter will be placed on the table in the tent. By reading it, you will get to the next stage of the quest.
Next, emerge from the tent and battle off the goblin enemies that will spawn. Once the enemies have been cleared, you'll be able to follow the NPC to the next step. The enemies shouldn't cause any trouble at this stage of the game.