Basically the following steps worked for me for this:
Add the LLVM project's toolchain to Xcode's Toolchains:
Make sure the directory ~/Library/Developer/Toolchains exists.
Symbolically link the toolchain /opt/homebrew/Cellar/llvm@14/14.0.6/LLVM14.0.6.xctoolchain within the ~/Library/Developer/Toolchains directory.
Restart or start Xcode.
Go to the Xcode menu dropdown, a "Toolchains" menu option should appear now, select the new toolchain.
Edit your project's OTHER_LDFLAGS setting:
Add -L/opt/homebrew/Cellar/llvm@14/14.0.6/lib/c++
Add -Wl,-rpath,/opt/homebrew/Cellar/llvm@14/14.0.6/lib/c++
Hope this helps.