This tutorial contains instructions to install Docker Engine (not Docker Desktop) on WSL2 distribution. For instance, an Ubuntu 22.04 distribution will be used.
Make sure you have fully uninstalled any versions of Docker. The instructions to uninstall can be found here.