alright you’ll see that normal knocking out occurs too with layer masks (ie using lasso tool, extract etc…)
what’s great with layer masks is that you can paint out what you don’t want.
On the attachment I provided you see that I added a blue background color, that’s to better contrast the cut-out part with the rest of the train. What i did there since it’s pretty much straight lines (and I have a wacom for selections) I only used the poly lasso tool, close the selection, select the layer mask, and fill selection with black (so it means the blue underneath is revealed)
Now keep in mind that you can paint directly on the mask, so it means when you have very small details or are handy with a cursor, you can ‘paint off’ directly… I use it when I have curves too difficult to handle with normal lasso, or magnetic lasso)
layer mask & vector mask are very powerful tools, make sure you know how to handle them !