Download from Apple: metal-cpp_macOS12_iOS15.zip
You may need to do:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
to get command-line compiler for metal working
Example of adding to vectors using the Metal-cpp from Apple. Original example in Objective C: https://developer.apple.com/documentation/metal/basic_tasks_and_concepts/performing_calculations_on_a_gpu?preferredLanguage=occ
Getting started with Metal C++: https://developer.apple.com/metal/cpp/