Windows 10 in S mode is designed for security and performance, exclusively running apps from the Microsoft Store. If you want to install an app that isn't available in the Microsoft Store, you'll need to switch out of S mode. Switching out of S mode is one-way. If you make the switch, you won't be able to go back to Windows 10 in S mode. There's no charge to switch out of S mode.
On your PC running Windows 10 in S mode, open Settings > Update & Security > Activation.
In the Switch to Windows 10 Home or Switch to Windows 10 Pro section, select Go to the Store. (If you also see an "Upgrade your edition of Windows" section, be careful not to click the "Go to the Store" link that appears there.)
On the Switch out of S mode (or similar) page that appears in the Microsoft Store, select the Get button. After you see a confirmation message on the page, you'll be able to install apps from outside of the Microsoft Store.