It might be helpful to mention M1/M2 macOS requires additional environment setup as well:
Add an environment variable as follows
export CPATH=/opt/homebrew/include
export LIBRARY_PATH=/opt/homebrew/lib
Reference: https://apple.stackexchange.com/questions/414622/installing-a-c-c-library-with-homebrew-on-m1-macs
It might be helpful to mention M1/M2 macOS requires additional environment setup as well:
Reference: https://apple.stackexchange.com/questions/414622/installing-a-c-c-library-with-homebrew-on-m1-macs