For the internet, information passes from one network to another as for the post office.
If you send a package to Spain it goes with the Swiss post office to France and then other posts take over. It’s the same with the internet.
Swisscom will take the packets to the next point for example in Germany at de-cix (which is in Frankfurt) then the data will go through other networks.
Using the tracert command in Windows allows you to see how long it takes for information to go to each gateway.
This way you can see where the problem is. (here the latency time increases significantly)
So, without additional information we cannot say anything except that
if the line (the swisscom part) had a problem the latency would also be problematic for the speedtest.