1. could have been that your router was not able to keep up. (maybe some other application took all the Wi-Fi(for example a game or YouTube, or if other people use the same Wi-Fi it could be that the router could not keep up with multiple devices)
In some routers you can prioritize what gets the most Wi-Fi, in windows you can also prioritize which application gets priority.
2. try updating Wi-Fi drivers or if you have a wired connection ethernet drivers. Though I dough this will improve but it cant hurt to update drivers.