Different games use different ports to send and receive data, and it can be hard to figure out what's going wrong without looking closely at the details. I dont know your technical/IT background so I'll try to keep it simple. You may need to reach out to tech-savvy friends. to help you.
Anyway, as a rule of thumb, If a game or an application works fine on mobile data but starts lagging on Wi-Fi, there's a good chance your modem or Wi-Fi router is slowing down certain types of traffic based on the port or protocols used. To fix this, you'll need to check that your modem and Wi-Fi router aren’t limiting/shaping any traffic.
Sometimes, your internet provider might also be the issue. They could be slowing down certain types of traffic, like when people are downloading large files (torrents etc), their network could be congested, the peering with providers that give EA servers internet access. It’s different for each case, but I’d suggest checking your modem and Wi-Fi first, and then contacting your internet provider if needed.