belela777 wrote:
so just to make sure i understand i can only download malware if my phone was jailbroken?
You can download malware regardless of whether your iPhone was jailbroken. It's quite rare, but there's a big business in breaches. And some folks here are targets—dissidents, political activists, senior politicians, and those with access to sensitive information or extensive wealth.
Here, you can continue to focus on whatever happened (and that's far from clear to me), or you can learn from it and can work to improve the areas where your existing security is weaker.
Passwords and password re-use and password disclosures are a larger risk for most (all?) of us than might be the (unlikely) chance you've actually managed to be targeted by some malware.
I'd encourage enabling two-factor authentication, if not already configured, and here is some additional related reading around better-securing your whole environment:
Checklist: If you want to see if anyone else has access to your device or accounts - Apple Support
Checklist: If you want to make sure no one else can see your location - Apple Support
Checklist: If you want to stop sharing with someone whom you previously shared with - Apple Support
Device and Data Access when Personal Safety is At Risk