You need to have Windows 10 update 2004 before execute below commands.

WSL 2 improve performances for WSL.

Enable Virtual Machine feature

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Download the Linux kernel update package

Download package and install it.

Reboot after this.

Set WSL 2 as your default version

wsl --set-default-version 2

Check your distro

wsl --list --verbose

If any distro is in version 1, you can force version update

wsl --set-version Ubuntu 2