Hi Sakibul,
You are running into a certificate problem, not a bad notebook. The OneNote dialog that says Unsupported server means the TLS certificate your Mac sees on the path to Microsoft 365 is not trusted, so the app refuses to sign in and it loops. This is usually caused by a VPN, a web filter or antivirus that inspects HTTPS traffic, a corporate proxy, or an incorrect system time. Clearing cache and Keychain does not fix a bad certificate, so the loop keeps returning.
Quit OneNote and disconnect any VPN or filtering app you use. Connect your Mac to a clean network such as your phone hotspot.
In Safari, sign in to login.microsoftonline.com and then to onenote.com. If Safari shows no certificate warning and you can see your notes, open the OneNote app and sign in again. It should sync normally on the clean network.
Reconnect to your normal network and either turn off HTTPS scanning in that product or add exclusions for Microsoft 365 domains such as login.microsoftonline.com, onedrive.live.com, *.sharepoint.com, and onenote.com.
If this is a work device, ask IT to bypass Microsoft 365 endpoints or to install their inspection root certificate into the System keychain as trusted. Also make sure macOS Date and Time is set to Set time and date automatically, then restart OneNote.
Tell me what happens on the hotspot. If it still fails there, I will walk you through a clean OneNote for Mac reset next.