Bitcoin transactions are irreversible, so you can't get them back
But if you know HOW it happened you can prevent a future occurrence.
How do you usually access your wallet? Do you use the website on a PC? Or a mobile app?
Were you given a seed phrase (a set of 12 or so words)? How did you store the seed?
If you're using a PC then you should do a full scan of it for malware.