Edit .wslconfig, reopen your Linux terminal, and nothing has changed. That is normal: the WSL 2 virtual machine is still running with the old settings. One command resets it.
wsl --shutdown
The documentation says it immediately terminates all running distributions and the WSL 2 lightweight utility virtual machine. It names two typical reasons to use it: changing memory usage limits and making a change to your .wslconfig file.
After editing the file, run the command and then open your distribution again. It starts in a fresh VM, so the new settings apply.
The caveat is the word immediately. Nothing inside the distributions gets a chance to wrap up, so save your work and stop long-running jobs first, such as a database or a build. Anything you started in a Linux shell dies with it.
To stop a single distribution and leave the rest running, wsl --terminate <Distribution Name> does that. Use wsl --list --running to see what is up before you decide.
To check afterwards what you are running, wsl --version shows the version information of WSL and its components, and wsl --status shows general information such as the default distribution and the kernel version.
None of this was run on a live Windows machine here. It follows the Microsoft documentation.
Further reading: Basic commands for WSL