This is NOT an iPhone problem; it is a problem with your router settings.
A "Weak Security" notification means that your Wi-Fi router is not configured correctly. There is a new feature in iOS 14 that checks and displays a message if your router is not using the most up-to-date security settings. Note that your router has always had weak security, you just didn’t know about it until now.Â
See this Apple support article for how to configure it correctly—>Recommended settings for Wi-Fi routers and access points - Apple Support, specifically the section headed Security. And don't forget to configure your range extenders (if any) also!
This warning will not prevent you from using Wi-Fi; if you have a Wi-Fi problem it is unrelated to this warning. See→If your iPhone, iPad, or iPod touch won’t connect to a Wi-Fi network - Apple Support