After the latest update, Hogwarts Legacy no longer starts for some players and shows the error “Unable to initialize Steam API”.
First check which Proton version is set for the game. I use Proton Experimental and the game starts fine with it.
If that alone doesn’t help, the Steam forum has another approach. The old Steamworks folder may conflict with the newer version:
- Open Steam → Hogwarts Legacy → Manage → Browse local files.
- Navigate to:
Engine\Binaries\ThirdParty\Steamworks- Delete the old Steamv154 folder.
- DO NOT delete Steamv165! This is the current version.
- Launch the game again.
The old Steamworks folder may cause a conflict with the newer version.

Source: Steam forum