Restrict guest access permissions is a preview feature. To enable it, you need to sign into the Azure AD admin center with a global admin account. Then go to the Azure Active Directory overview page > User settings > External users > Manage external collaboration settings > select "Guest user access is restricted to properties and memberships of their own directory objects"
You need to be a global admin to configure these controls.