How to use of wishlist_add_product event in Magento 2?

Wishlist adds product events that will be used to define data after a successful item added to the wishlist.

If you want to trigger something once product added to wishlist or do some action after item added to the wishlist, you need to define "wishlist_add_product" in your events.xml file.

Create Observer Class to handle your logic after adding items to the wishlist. In the observer file, You got Product, Wishlist, and Current Item object, based on that you can retrieve/modify your logic.

You can define events.xml file in your frontend area.

Path: Jesadiya\WishlistAdd\Observer\WishlistAddItemObserver.php

This event will be used after the item added to the wishlist successfully.

You can check the core definition from the Magento_Wishlist module, vendor/magento/module-wishlist/Controller/Index/Add.php

You can also refer to the core example from the Magento_Reports module,

Magento/Reports/Observer/WishlistAddProductObserver.php

You can also interested to learn A Complete List of all events in Magento 2.