In a car accident vs. by a car accident

Hello, I have a question on the difference between in and by in the following sentence:

I had my leg injured in a car accident.
I had my leg injured by a car accident.

Is there any difference between them? I guess they seem same, but if there’s any, please let me know.

Thank you in advance,
sweetpumpkin

2 Likes

I had my leg injured in a car accident by a truck.

2 Likes