Nintendo has a support page on this :> Apparently it's their internet connection. The only real way to "fix" it is to either get better internet or find a better place to play the switch so it connects better. There's also some peeps on forums saying that removing then re-entering the wifi info helps. Outside of that I can't really find any other fixes online, but Nintendo has a hotline if it's a big issue that wont resolve itself.
It can be bad internet or it can be your internet/wifi setting. It depends on how tech savvy you are or whoever set up your internet is that they might be able to do something. There's plenty of support pages about this issue so hopefully one of the works. Good luck!