Step 1
Find the name of your instance:
wsl -l -v
learn.microsoft.com/en-us/windows/wsl/basic-commands#list-installed-linux-distributions
Step 2
wsl --export --vhd <instance name> $(date '+%Y-%m-%d-%H-%M').vhdx
E.g.:
wsl --export --vhd Ubuntu-22.04 $(date '+%Y-%m-%d-%H-%M').vhdx