Hi there TheBakeMcB,
One step you can try is to close the Yahoo tab in Safari on your iPhone, then launch it again to see if that helps stop this. If needed, this article walks through how to do that: Open and close tabs in Safari on iPhone
To confirm, do you only see this message when visiting Yahoo or do you see it when visiting other search engines (or other websites) in Safari? This can help us determine additional next steps for this.
If there is an option to decline and/or remember that choice, does this still appear after selecting those? If those options are available and you haven't done that yet, please try that to see if it will stop that message from appearing every time you try to visit the Yahoo website.
Take care.