Does something like a contact sensor exists?

So sad I didn't figure this out at first. Thanks a lot!