The android 12 update has created issues with wifi connectivity. This phone is running worse than even now. Fix it please
The newest version in your phone will have a Hardware Diagnostics option try troubleshooting the wifi card itself. Then go to Connections > tap three dots > Advanced > WiFi Control History and see what Apps have the ability to randomly turn on/off WiFi. Also try deleting old APs, if you have WiFi Secure try deleting the Cache or Disable it.You can also go into Developer Options and select > WiFi Safe Mode and/or WiFi Scan Throttling they may both help until something better comes along!