There are 2 methods to include Onclick Popup inside the menu link.
Using the standard WordPress method

Go to your WP admin panel
Go to Appearance >> Menus

At the upper right corner of the Page you will see* Screen Options** dropdown menu, click on it and check CSS Classes option.

You will see CSS Classes (optional) option

Add our class 'sg-popup-id-1' where id-1  is a Popup ID.

Using 3-rd party shortcode plugin
You can use a 3rd party plugin which will allow you to use shortcodes inside the menu item.
Please follow the steps to get it done:

Install the following plugin
Check this screenshots to activate shortcodes panel
Add our shortcode like this [sg_popup id="1" event="click"]Your text[/sg_popup]
Was this article helpful?
Thank you!