This error is displayed when you are not signed in to a Google account.
Make sure you are signed in and connected to Google Play, and try the following:
1. Make sure that the Google account registered on your device is the same one that's registered in the Google Play Store.
2. Clear the cache and the data for the Google Play Store with the following steps:
Settings > Apps & notifications > Google Play Store > Storage > Clear cache
Note: The displayed content may differ depending on the Google Play Store version.
3. Reinstall the app.
Note: You will need to link your Nintendo Account when reinstalling, so check your Nintendo Account credentials beforehand.
For more information, check "I want to check the e-mail address registered with my Nintendo Account."
4. Try the suggested steps on these Google Play Help pages: