I’m scared of cats
I’m scared by cats
Both are technically correct but they are different and one is more commonly used.
I’m scared of spiders = I’m afraid in general (this is the most common sentence)
I’m scared by spiders = Spiders give me a shock (ok but not a usual sentence)
Generally, we use “scared by” in the past, not in the present tense. The scare is one time, not in general.
It was dark. He walked through the park. He was scared by the sound of the wind. He started to run.
He doesn’t like bugs. He’s especially afraid of spiders.
o: He was shocked by the way she spoke to him. So rude!
x: He was shocked of the way she spoke to him. So rude!
Sometimes you can use either and the difference is subtle.
She was scared of the stream chat, they said horrible things. (In general, but in the past)
She was scared by the stream chat, they said horrible things. (Scared by one event in the past)
She is scared of the stream chat, they say horrible things. (She doesn’t like them in general)
She is scared by the stream chat, they say horrible things. (They make her afraid by their actions, in general)