Check whether Docker Desktop is actually running, not just installed, and wait for its status to show running before retrying.

Run a simple version command and note whether the client responds but the server section errors.

List the CLI contexts and confirm the active context is the desktop one for Windows, not a remote or Linux daemon context saved earlier.

Restart Docker Desktop fully, wait for the running state again, and retry the version command.

If it still fails, check that the Docker Desktop service and its WSL backend are running and that no security tool is blocking the named pipe, then reinstall or repair Docker Desktop if the pipe never appears.