Hello Wojtek. The OneNote desktop sign-in error with error code 1067, tag 7q6ca, and correlation ID that you are experiencing appears to be part of a known issue with Microsoft 365 apps on Windows 11, especially after recent updates. This error is usually related to a corrupt user profile or a mismatch between the Office authentication system and your Windows account, and therefore, OneNote is unable to finish signing in (the web version works fine)
Microsoft support recommends creating a new local Windows user account, which will create a new system profile and permissions. After logging in to Windows with the new account, try to sign in to OneNote again with your Microsoft account. This workaround has helped many users circumvent the error and regain full sync capability. Lastly, ensure that you have fully updated OneNote and Office via the Microsoft Store or Office app settings.
Here's the reference: https://learn.microsoft.com/en-us/answers/questions/5394509/cannot-log-in-office-365-in-new-device
Best regards,