How to recreate the .sln file of a ue5c++ project if it was accidentally deleted?

If you’re on Windows 11, you can right-click the .uproject file, click “Show more options” and then click “Generate Visual Studio project files”.

(my screenshots are in portuguese but I hope it helps)