when doing bitcoin stuff its freaking important to connect to a trusted node. If the electrum server your leak your Xpub to is malicious and logs it along with your IP, byebye privacy and hello surveillance.
Use Shuken.io if you don't have a trusted node