From your desktop browser:
Navigate to https://www.nintendo.com/ then sign in and click on your name in the top right corner
Click on Nintendo Account Overview then Account Settings
Click on Sign-in and security settings
Find your ID in "Sign-in ID"
From your Switch:
Navigate to system settings
Select Users
Select User Settings
Select Link Nintendo account
If your account is already linked you will see Check Account information
Follow the prompts to sign in with your password, then view your Sign-in ID