When you do a speedtest, you're connecting to the closest possible server typically. When you play CSGO and use TS, you're using a different server likely much further away. Being on the Wifi certainly does not help your situation, and you could probably reduce your ping by hardwiring, but your ping is high because the server you're connecting to is likely much further than the speedtest server