each popup is identified by it's ID (name). If you create a popup with ID 'popup' that would be the default. Any object starting with test 'popup' will be treated as 'popup'. So, if you use 'popup_second' for another popup, it will be a separte popup.
You can also include column references to the popup name. For example a use case where you have a list of items which all have details behind the popup and you want to compare the details from two separate item. Now if you open the popup with default 'popup' all rows share the same popup and clicking another row will replace the popup content from that row. If you name the popup for example 'popup[id]', the row with ID 1 will have a popup named 'popup1' and second row 'popup2' and the popups will be treated as separate items.
Now in your case where you open a popup inside the popup, just make sure the popups have different name and they will be opened separately.