Please follow the last instructions by @Euler-37 about modifying the environment variable PATH.
But first, you need to understand that your operating system (Windows) has so-called environment variables that contain useful information for it.
The PATH variable contains a list of directories, separated by “;”.
If you type the name of a command/program in your terminal, for example gfortran, Windows will try to find the program gfortran in each directory listed in its variable PATH, one after the other. If Windows does not find gfortran in any directory, it will print an error message like “command not found”. If gfortran is found in one of these directories, it will be executed.
If you don’t put the directory of the gfortran executable into PATH, you will be able to run gfortran only in its own directory, which is not practical… Generally, you want to be able to run gfortran from any directory where you are working. So a first step is to add its directory after a “;” at the end of the PATH variable (just append that directory, don’t delete the other directories).