How to stop a WSL instance?

Method 1

wsl --terminate <instance>

E.g.:

wsl --terminate Ubuntu-22.04

learn.microsoft.com/en-us/windows/wsl/basic-commands#terminate

Method 2

reboot

Actually, the instance will not reboot, but just stop.