Open PowerShell as Administrator and run following command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
WSL2 Linux kernel update package for x64 machines
wsl --set-default-version 2
Open the Microsoft Store and select your favorite Linux distribution.
Check WSL version
wsl --list --verbose
Convert version
wsl --set-version <distribution name> <versionNumber>
Make sure to replace with the actual name of your distribution and with the number '1' or '2'.