In Hogwarts Legacy, there are dozens of Floo Flame fast travel destinations. Some of them are impossible to reach due to their proximity or other quests. The hospital wing is one of them. It is located near the South Wing of the castle but is inaccessible through any hallway, door, or secret passageway.
If you have tried to reach the hospital wing on your own and failed to achieve the goal, don't worry; tens of thousands of other players have experienced the same fate. The one thing all of you have in common is that you are simply not far enough along the way in the history of Hogwarts Legacy.
In Hogwarts Legacy, Getting to the Hospital Wing
After Gladwin Moon, the Hogwarts Caretaker sends you an owl and invites you to meet him near the Grand Staircase, you must complete the quest "The Caretaker's Lunar Lament."
Gladwin Moon will tell you that some students rubbed him in Hogsmeade, which was why he was so enraged when you first saw him during your initial trek to the village. After this Boggart assault, Moon discovered Demiguise statues all around the castle. He's most afraid of Demiguises, which the Boggart turned into in front of Moon, much to his displeasure.
Moon tasked you with finding all of the Demiguise statues along the map, which are mostly located in Hogwarts and Hogsmeade. However, to discover the first two that Moon knows about, you must enter the Faculty Tower. Moon will take you to a locked door, where you will learn Alohomora, the unlocking charm.
Continue making your way up the stairs while casting the Disillusionment spell until you reach a turquoise unicorn in a fountain. Turn to the left in front of the fountain and there will be the hospital wing. Here, Professors Garlick and Hecat will be talking over a student while a nurse is making her rounds around the room.
Make sure that you activate the Floo Flame fast travel location, just outside the room in front of the stairs, regardless of the quest you're currently undertaking. This will ensure that you can return to the hospital anytime after your current quest is completed.