How to turn off the Windows S-Mode
Windows 10
On your PC running Windows 10 in S mode, open Settings > Update & Security > Activation.
Find the Switch to Windows 10 Home or Switch to Windows 10 Pro section, then select the Go to the Store link.
Note: Don't select the link under Upgrade your edition of Windows. That's a different process that will keep you in S mode.
On the page that appears in Microsoft Store (Switch out of S mode or a similar page), select the Get button. After you confirm this action, you'll be able to install apps from outside Microsoft Store.
Windows 11
On your PC running Windows 11 in S mode, open Settings > System > Activation.
Find the Switch to Windows 11 Pro section, then select the Go to the Store link.
Note: Don't select the link under Upgrade your edition of Windows. That's a different process that will keep you in S mode.
On the page that appears in Microsoft Store (Switch out of S mode or a similar page), select the Get button. After you confirm this action, you'll be able to install apps from outside Microsoft Store.
Source: "Windows 10 and Windows 11 in S mode FAQ" at Microsoft