Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
That is a SCAM message. Press Command, Option and Esc keys and this will bring Force Quit window. Select Safari and click Force Quit. This will close Safari.
Then hold down Shift key on your keyboard and open Safari. Click on Safari menu and select Clear History and Website Data. On the dropdown next to Clear, select All History and click Clear History.
(If you see Reset Safari instead, click it and Reset Safari)
That will remove it.
If you have any difficulty on following the steps above or if you are unable to remove it, please reply in here and I will continue to help you. Please let me know how it goes