hiding objects/part of objects behind a invisible wall

Hi all, I am trying to create an invisible wall that would hide objects/part of objects as per shown in image below.

I am very new to unity and i need this for my coursework.

I tried to look onto Sharder, linecast, raycast and occlusion. I couldn’t get this right at all.

Please anyone could help me.

What you’re looking for is a stencil mask, like