What to do if the core file does not contain private.hpp?

I am trying to make a program that will detect and recognize faces but it says that no such file or directory of private.hpp in core file.

you probably setup your compiler includes in a wrong way,
should use:

#include "opencv2/opencv.hpp"

and

-I /usr/local/include/opencv4