Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
Follow the steps below to fix the issue.
Press and hold down the Power button and Home button at the same time for 10 seconds or until it shows the Apple logo. When you see the Apple logo, release the buttons and let your iPhone boot.
Then without opening Safari, open Settings app, select Safari. Tap Clear History and Website data button. Press home button to close that screen. That should remove the scam message. You can now open Safari without getting that message.
If you have any questions or would like any additional information, please don't hesitate to ask.
If you are satisfied with my service, please remember to rate me as Good or Excellent Service (4 or 5 stars) and click Submit at the top. Thank you.