Microsoft updated the OneNote Modern app—or what it calls the OneNote for Windows Store app—to support password-protected notebook sections, removing one of the final migration barriers for many users.
There's not a lot to say here: Once you have the latest version of the app, you can type in a password when you encounter a protected section.
Once you've unlocked a password protected section, you can view and edit its contents as you would normally, though page thumbnails are not displayed for privacy protection purposes. The section will automatically lock again if you don't use OneNote for a few minutes, or you can lock all of your password protected sections manually via a new button in the app bar.
Tip: Or, just type Ctrl + ALT + L.
What this app doesn't appear to do is let you password-protect a section. For that, I guess you would still need to use the desktop version of the application. (Which is also available for free, by the way.)