apart from finding headers (hey, progress !!)
you need to link to the resp. openv libs, so expand your cmdline with:
-L/usr/local/Cellar/opencv/4.5.3_2/lib -lopencv_core -lopencv_imgproc [... more libs]
(look at the code, you need to add the resp. lib for each opencv header you include)
also, please have a look at the cmake example ,
usually you would rather generate a makefile, instead of fiddling with this manually