Fatal error: 'openssl/ssl.h' file not found on macos

I have been able to resolve the issue by removing /Applications/XAMPP/xamppfiles/bin/openssl from the path. Its now showing openssl installed through Homebrew.

mongodb was configured with the following options:

Build configuration:
CC : cc
CFLAGS : -g -O2
CPPFLAGS : -DHAVE_CONFIG_H
Extra flags :
Developer flags (slow) :
Code Coverage flags (extra slow) :
libmongoc : Bundled (1.30.5)
libbson : Bundled (1.30.5)
libmongocrypt : Bundled (1.12.0)
LDFLAGS :
EXTRA_LDFLAGS :
MONGODB_SHARED_LIBADD : -Wl,-rpath,/opt/homebrew/Cellar/openssl@3/3.5.1/lib -L/opt/homebrew/Cellar/openssl@3/3.5.1/lib -lsasl2 -lresolv -Wl,-rpath,/opt/homebrew/opt/zstd/lib -L/opt/homebrew/opt/zstd/lib -lpthread -pthread -lz -lzstd -lssl -lcrypto -lpthread -pthread

Thanks for support