Double-click the ExifTool-12.37.pkg installer again. You will rceive the following dialog as you mentioned:
Click OK, and immediately visit System Preferences > Security & Privacy panel > General, and click Open Anyway button on that panel:
This will offer still another dialog which you click Open:
and then the ExifTool pkg installer will run and present you with the customary installer panel. You will need your administrator password to complete the installation. The ExifTool binary will be in /usr/local/bin/exiftool, and if your Terminal shell PATH is set to include the /usr/local/bin path, then you should be able to launch exiftool without the full path.
This installation of ExifTool via this pkg installer does not include a man page, but you can get that content with the following in the Terminal:
exiftool -h
This will be paginated output so you can press the spacebar to advance a page. Or, you can redirect the entire documentation to a text file on your Desktop:
exiftool -h >& ~/Desktop/exiftool.txt