There are several apps for Shopify that have the functionality you’re looking for, meaning there’s no need to add custom code to your theme or hire a 3rd party developer to build a custom app on your behalf.
I would suggest trying out the Locksmith app. This app has features that allow you to easily “lock” specific collections (and their products) to prevent them from being accessed by the general public. In order to access the “locked” collections, you can require the customer to login to their account, use a special passcode, have a certain tag added to their account, etc.