Cat and toddler

Alexis • Mom to Rocky Bruce IV 3/1/19 and Lindsey 1/5/21

Ok so I’m not sure what to do about my cat. I’ve had her since before my two year old son was born and she is very back and forth with him. She is basically like an emotional support animal to me. I really don’t want to get rid of her because she helps me through a ton! She sometimes is super lovey towards him but she sometimes snaps at or scratches him. Never unprovoked though it’s always when he tries to pet or hug her. Otherwise she leaves him completely alone. Any suggestions on what I should do?