agl218 And now after I have reset the phone to factory settings (used phone), there should not be a risk for my computer when I connect it?
It's pretty unlikely, but not theoretically impossible. For example, a state-level actor could very plausibly add enough hardware to attack a connected PC, or maybe a really good criminal gang.
It might make more sense to ask how likely, or how expensive, a threat would be, rather than whether it is possible.