Hi all
I have recently had this same problem and have found a cause and fix for my particular circumstances. This could be similar to your own experience.
I was getting "Invalid notebook name" regardless of template selection and name value with no more detail. Repairing the installation did not resolve it.
My email address was associated with two seperate Microsoft accounts. One was a personal account and the other was a work/school account. OneNote was connecting by default to the personal account. I could fix this by signing out, and then signing in again
but clicking the button to say use a Work of School account, then entering the login credentials.
Hope this helps.
Thanks