Fatal Error: Can't open module file 'first_module.mod' for reading at (1): No such file or directory

first_module.mod doesn’t exist because the compiler just compiled test.f. You don’t mention fist_module.f in your compiling command thus it wasn’t compiled at all. The simplest and fastest solution is what @Arjen recommended. I personally prefer a makefile which makes things clear and it is more or less mandatory for larger projects as well. It is a good idea to get used to them. In your case, consider the following makefile (a little more generic and expandable):

SRC_DIR = .
OBJ_DIR = .
EXE = ../test

FC = gfortran
FFLAGS = -std=f90 -O2 -Wall -Wextra

FINCLUDES = 

LDFLAGS = 

LDLIBS = 

OBJS = \
	$(OBJ_DIR)/first_module.o\
	$(OBJ_DIR)/test.o.o

all: $(OBJS)
	$(FC) $(FFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $(EXE)
# ------------------------------------------------------------------------------
$(OBJ_DIR)/first_module.o: $(SRC_DIR)/first_module.f
	$(FC) $(FFLAGS) $(FINCLUDES) -c $(SRC_DIR)/first_module.f -o $@
$(OBJ_DIR)/test.o: $(OBJ_DIR)/first_module.o $(SRC_DIR)/test.f
	$(FC) $(FFLAGS) $(FINCLUDES) -c $(SRC_DIR)/test.f -o $@
# ------------------------------------------------------------------------------

The most important part is the last one where it clearly states that to compile test.f you need first_module.o, meaning you tell the compiler it has to compile first_module.f before attempting to compile test.f. This not only avoids errors like the one you got, but also gives the compiler enough information so that, if you just modify test.f later on, it will only compile that file and keep using the object code for first_module created earlier. Furthermore, it makes parallel compilation in larger projects possible.

Automated tools for Makefiles also exist, and you can use them instead, or you can use cmake, or other tools designed for that purpose, or even an IDE. If you want to get serious about programming, you will need one of those, so it is a good idea to get used to them even for small projects such as the one you posted.