Welcome to the community!
To prevent the message from coming up the you need to change the WiFi settings of the modem/router to use newer more secure encryption.
You may simply change the WIFI settings like the image below this should eliminate the error message popping up to your Iphone's screen.
Note: some older devices that do not support WPA2 may no longer be able to connect after making the changes.
More details can be found on the Apple website:
Let us know should you require further assistance.
I keep getting warning on my iOS devices with a privacy warning.
I have been on the website to try and change the WPA but it doesn’t give me an option what do I do?