Please try the following in the event of errors when trying to link a Nintendo Account.
1. Close all browser tabs.
2. Close all apps other than Mario Kart Tour.
3. Try using Google Chrome if you are using a different browser.
4. Set your browser settings to allow cookies.
5. Check that you aren't using memory cleaning tools, and if you are, disable them.
6. Temporarily disable security software and pop-up blockers while linking your Nintendo Account.