Nintendo now allows you to enable two-step verification, a form of two-factor authentication, for your Nintendo Account. Whenever you sign into your account—from a Nintendo Switch, on the web, or via a mobile app—you’ll need to enter a code generated by an app on your smartphone as well as your password.
Source: How-To Geek