You would typically set that variable in your .bashrc file so that it is set everytime you restart a WSL instance. That is a configuration file for the bash shell. WSL versions 1 and 2 work differently, so you would set that variable for the one you are using. Most users have had better success with version 1 of WSL. Besides that WSL instruction page, there are a few message board posts like this one that give some specifics for WSL1 and WSL2.
https://afni.nimh.nih.gov/afni/community/board/read.php?1,164375,164375