Your social media accounts were hacked, not your iPhone.
For the Wi-Fi not secure message, 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 and Mac OS Big Sur (11) 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!
After you change the router settings you should Forget the network in your phone settings and reconnect.
Note also that weak security does not interfere with using Wi-Fi, it is just a warning. Your Wi-Fi should still work normally, and, if it doesn’t, it is not because of the weak security message.