Here in Panama the electricity will go out more often than the internet will but that will take the router along with it. Also my laptop is an older HP which was top of the line when Specter ENVY was introduced, 15 years ago. Its still an ample and high quality laptop and I do like it, but the internal WIFI antenna is older.
So here are all of the steps I have taken to combat everything related to disconnect:
Installed a WIFI hot spot
App on my android phone with data plan. This is my first go to if the cable internet goes down.
Purchased the best battery back up sold at box stores which is designed for use to power computers. With just my WIFI router plugged into it, it will provide power for about 3 hours and keep the internet going in most power outage situations. After about 2 years I had to take it to a battery shop and have them swap out the battery and then it was good as new.
Purchased an inverter for the car and an extension cord. If the power is out for an extended period I start my engine, plug in the inverter, and run an extension cord from it through the window. This will keep the laptop going and charge the phone. I have yet to try it with the WIFI router added on to it but next time the battery back up is exhausted I will. I dont see why it wouldnt work.
Purchased a USB external WIFI antenna with 1200 mb/s speed. I dont think this is the fastest on the market but it was $20 and it reduced inadvertent disconnects which were likely due to an older laptop and not being hard wired into the router.
Also please note that if you do have a cable going into the back of the router that is just hanging out dangling but not connected to anything, remove it. This was messing with my internet speed and stability and it took a while to figure it out.