Usually, if you are only experiencing gameplay or loading freezes when your device is connected to the internet via Wi-Fi, it is likely due to an issue with the router you are connected to.
First of all, ensure that your router/modem is on the latest available firmware version from your ISP or hardware manufacturer. This can be a simple, automated process or it might require direct access to the router's internal menus, so please check this first carefully before attempting to update your device on your own.
It could also be that your signal strength is weak, so please be sure you have a strong Wi-Fi signal on your device. You can also try turning your mobile device's Wi-Fi off and then back on to reconnect to your network. Also, try turning off/unplugging your router for a few minutes and then reconnect the power to restart it.
Forgetting/deleting your Wi-Fi settings and reconnecting to the network can also help. Please be sure that you have your network's Wi-Fi password before you do so, and that your security type is correctly set. Also, if you use MAC Address filtering, ensure that your device is included in your router's list of approved devices.