Disable Installing Apps only from Windows Store: Change app installation settings on Windows 11.
To help protect your PC and keep it running smoothly, Microsoft recommends only installing verified apps from the Microsoft Store. You can choose where you can get apps from and if you want to see app recommendations when you try to install an unverified app from outside of the Microsoft Store.
How to Install Unknown Apps in Windows 11: Another way to change this settings to install unknown third-party apps.
1. Select Start ➤ Settings ➤ System ➤ Storage ➤ Apps & features
2. Under Installing apps, select one of the available options. To stop seeing app recommendations, select either Allow apps from anywhere or Turn off app recommendations (options vary by Windows version).