Nintendo does not have a built-in gifting system like Steam or PlayStation — you cannot directly gift a game to another Nintendo Account through the eShop. The best way to gift a Nintendo game is to purchase a Nintendo eShop gift card or a Nintendo game download code and send it to the recipient directly by message or email. They can then redeem the code on their own Nintendo Account at ec.nintendo.com/redeem or through the Nintendo eShop on their Switch. Things to keep in mind when gifting:
Make sure the code or gift card matches the recipient's Nintendo Account region — a US code will not work on a European account
Nintendo eShop gift cards come in fixed denominations and let the recipient choose their own game
Download codes for specific games are a great option if you know exactly what game they want
Once a code is redeemed it cannot be refunded or transferred