How did this happen?
Apart from you, someone else got access to the same wallet/address where the funds were sent.
It could happen due to following reasons,
1. You accidentally entered your seed phrases/privkeys online and someone found it and accessed the wallet.
2. You downloaded a fake Electrum wallet that has a script to broadcast seed phrases or features to execute remotely.
3. Clipboard malware, which captures every keystroke of yours and delivers it to the attacker.
4. The attacker infects the device and stole the wallet file if it's not password-protected.
in many more ways but the point is your wallet is been compromised or the device where your wallet is installed.