Press the Windows Key + R, type optionalfeatures , and hit Enter.

Ensure the Windows Update service is enabled and not paused.

Click OK and select "Let Windows Update download the files for you." Restart your computer once the process finishes. Alternative: Using the Command Prompt (DISM)

Locate ".NET Framework 3.5 (includes .NET 2.0 and 3.0)" at the top of the list. Check the box next to it.

If you are on a corporate network, your IT department might block optional feature downloads. You may need to bypass the Windows Server Update Services (WSUS) temporarily.