You generally won't use the Metal Shading Language directly for ray tracing (unless you want to do it all manually). The easiest way is to use the MetalPerformanceShaders framework with its own acceleration structures:
Metal Performance Shaders | Apple Developer Documentation
Optimize graphics and compute performance with kernels that are fine-tuned for the unique characteristics of each Metal GPU family.developer.apple.com
There are also some lower level functions specifically for adding acceleration structures and intersection functions to a commandEncoder (but they're probably just using the MPS shaders I'd guess).
MPS was the early high-level RT API but Apple has introduced a full-fledged programmable RT API that lets you combine rasterization and RT or implement your custom behavior on the basis of RT primitives. From what I understand, the new API supersedes MPS RT and advanced applications should use the new RT API going forward.