Normally one doesn't compile header files, because they are normally included in the cpp files. I like to have it so I am compiling all of the cpp files in the directory.
Also turn all the warnings on ; specify a std to compile against, preferably the latest one that is installed:
g++ - std=c++17 -Wall -Wextra -pedantic-errors *.cpp -o RayTracer
It's worth reading the manual, there are zillions of options, but still worth it.