How would i make a part subtracter with a frame?

Hello,
I am going to keep it simple, i want to make a subtracter, like this.

I searched, just to find no results of what i want.

Any help is appreciated!

There’s a very good tutorial on this: