Please try the following.
(1) Close all other apps you have open.
(2) Close all browser tabs.
(3) Open your device's Settings menu, tap Safari, then set Block All Cookies to off in the Safari settings menu.
(4) Open your device's Settings menu, tap Safari, then tap the Clear History and Website Data button.
(5) Access the below link using the Safari browser and try to log in.
https://accounts.nintendo.com/
If you are able to log in, try logging in from the app again.
If the above steps don't resolve your issue, please try the below.
(1) Open your device's Settings menu, then tap Screen Time, Content & Privacy Restrictions, Content Restrictions, then set Web Content to Unrestricted Access.
(2) Open your device's Settings menu, tap Passwords, then turn off AutoFill Passwords.
(3) Check the settings of the following apps or software if you are using them:
・Security software
・Content blocker
・VPN
(4) Go to Settings, Cellular, Cellular Data Options, then Data Mode, and turn off Low Data Mode. (This option may not be available depending on your OS version.)