As long as you did not convey sensitive information such as credit card numbers, social security numbers, or bank account numbers you should be fine. As mentioned software that you download from such locations, may appear in the download folder, and should be deleted immediately and not ever run.
The first step when you get such a screen is hit this key sequence
command-option-escape
This brings up the force quit screen.
From the force quit screen pick Safari, Chrome, Firefox or any other web browser you have open and quit them with the Force Quit button.
Once that is done, hold the shift key while double clicking the same web browser.
When enquired do not load the last page running, load a blank or home page.
Check your browser extensions to make sure no new extensions were loaded. Clean your browser cache, and cookies, without logging out sites, unless you have kept a separate secure offline inventory of your password hints. If you have created a separate offline inventory, delete all cookies and cache and history.
Be mindful of emails with awkward looking email addresses.
Be mindful the website structure of any site is
http(s)://computer.domain.suffix where the s appears only on secure websites without parenthesis.
user@domain.suffix is typical structure of email.
The domain is typically the company name. Any - hyphens in the name that are not normally the company name, should indicate a possible phishing domain in an email or website.
suffixes of .top, and .site, are often phishing domains.
suffix of .us are typically state government sites. .co.uk are companies in the UK.
If uncertain, look for the company on a search engine and verify the site name is the same.