Recover Unreal Engine 5 Program Itself

I recently formatted my PC and my Unreal Projects were backed up because their default destination was D disk and I just resetted C disk. And before format, Unreal Engine 5 program itself was in D location too (one with the name UE_5.1). So I have around 58 GBs of UE program which I think including core components, starter content etc… I thought I was good to go but then I realized I didn’t back up my C/Program Files/Epic Games which contains UE.exe files. Is there a way to link UE_5.1 folder to Epic Games so that Epic recognizes the engine?