You should make sure to update OneNote, the Microsoft note-taking app and organizational platform, regularly. Keeping OneNote updated ensures that you get all the latest bug fixes and added features.
If OneNote freezes when typing or drawing in Windows 11, follow these instructions i.e. disable automatic hardwriting recognition, clear cache, etc.