If you want to enable TouchID for sudo Terminal commands on macOS you'll need to edit /etc/pam.d/sudo and add the following line at the top of the file:
sudo
/etc/pam.d/sudo
auth sufficient pam_tid.so