2 Steps:
1- Copy the file hostfxr.dll
From:
C:\Program Files\Unreal Engine\UE_5.0\Engine\Binaries\ThirdParty\DotNet\Windows\host\fxr\3.1.9
To:
C:\Program Files\Unreal Engine\UE_5.0\Engine\Binaries\DotNET\AutomationTool\
2- Download and install the .NET Desktop Runtime 3.1.x from this link:
https://dotnet.microsoft.com/en-us/download/dotnet/3.1