With Windows Subsystem for Linux 2 you got a terminal from which you could compile and run console programs. With Windows Subsystem for Linux GUI you can run Emacs, Gnuplot, and other programs with GUIs. If you already have WSL2, to upgrade you just run, from CMD,
wsl --update and then
wsl --shutdown to have the changes take effect. It works smoothly for me. Before when I used WSL I would edit source files on Windows and switch to the WSL terminal to compile and run. Now everything can be done easily within WSL.
You can install gfortran 11 with
sudo apt install gfortran-11