The closest matches on Steam are The Elder Scrolls V: Skyrim Special Edition, The Elder Scrolls IV: Oblivion Game of the Year Edition (2009), Dragon's Dogma: Dark Arisen, The Witcher 3: Wild Hunt — Remastered and The Elder Scrolls III: Morrowind Game of the Year Edition.
From the Steam games with at least 2,000 reviews and 80% or more positive, we keep the ones whose main player tags match Hogwarts Legacy's most closely, then show the closest first.