Problem connecting to public wifi on Macbook Pro
Since you have a pop up, it’s almost certain the WiFi link is connecting and you are dealing with the networking side / captive portal.

One thing that sometimes helps is opening a web browser and going to http://captive.apple.com or just any web page.

Typically the security / registration / portal then lets you answer whatever questions / accept any EULA and then give you a proper IP address / DNS server / connection to the internet.

Past that, you’ll need to look at DHCP response or contact the person that supports that network to check their side.