This problem usually occurs if you are using a corporate or an organization's OneDrive account. Your admin might have disabled third-party app access to OneDrive. Please reach out to your IT department and ask them to enable it.
Afterward, you should be able to link your OneDrive account with GoodNotes.