You must link your user account to a Nintendo Account prior to sending or receiving friend requests.
There are two ways to become friends. Either you must accept a friend request you have received or the other user must accept a friend request sent by you.
Select your user icon (My Page) on the HOME Menu, and then select "Add Friend."
From this screen, you can accept pending friend requests that have been sent to you, view pending friend requests you have sent, or use the following methods to send friend requests.
Via Local Users: Select this option to exchange friend requests with near-by users.
If the Switch console is not connected to the Internet, the friend request will be temporarily saved on the console. The friend request will then be sent automatically the next time the console connects to the internet.
Via Users You Have Played With: Select this option to send friend requests to users you have played with in internet matches or other online play.
Via Friend Code: Select this option to send a friend request to another user by entering their friend code.
Suggested Friends: If you have linked another application (Miitomo, etc.) to the same Nintendo Account, users with whom you are friends in that application are displayed so that you can easily send them friend requests. If you do not want Friend Suggestions to display, open the Nintendo Account settings screen from your smartphone or computer and change your Friend Suggestion Feature Settings.