For those who still has this like I had once You have to reinstall the window and then install the .Net core 3.1 , Windows 10 SDK from microsoft website.
I’ve tried doing windows the way so that I don’t lose my data and so only window reinstalls but this didn’t resolved the error SO Then I had to reinstall window completey new and I put my project in USB and Then I reinstalled all the epic games and unreal engine .
This was the only option for me.