Password Protection
Microsoft OneNote allows password protection of sections of a Notebook; however, passwords once set are not recoverable; if forgotten, it is IMPOSSIBLE to reset access, and all notes in that section will be lost. Consider using a password manager. In addition, locked sections can still be permanently deleted without entering the password.
If you want to secure access to OneNote, a better way is to enable multifactor authentication on the Microsoft account you used to sign in. Microsoft offers several methods for protecting your account, including through its excellent authentication app.