Step 1: Sign into Office 365 admin portal via https://portal.office.com
Step 2: Click on Admin from the left pane and navigate to All admin center > Sharepoint.
Step 3: Navigate to Site > Active sites.
Step 4: Click on the site you would like to change the permission.
Step 5: Switch to Policied tab and click on Edit under External sharing.
Step 6: Scroll down to Default link permission section and uncheck the checkbox and click on View.
Step 7: Click Save.