How to detect NFT's on a players wallet?

Hello!
I’ve seen this somewhere in the world, a case where i pressed a button to access a building, where the door only opens if i have a certain NFT in my wallet. How would i begin make this check?