Material that occludes mesh

Hey, I’m attempting to create a material for the highlighted mesh that occludes any meshes within it(the cube mesh will be transparent), preferably by fading them out to avoid ugly culling or maybe even have the meshes half transparent. I thought it’d be fairly straight forward but cannot think of where to start. I’d appreciate any help greatly, feels like it should be simple but can’t find any relevant information on the topic.
Thanks for reading,

Rory