Cat keeps peeing against walls.

my cat is 10 months old, she’s not spayed and she keeps peeing in corners and against walls. She’s litter box trained and will poop and pee in there just fine but it seems like when she’s in heat she will pee outside the litter box. could this be because she’s not spayed? or maybe because we have another cat? I read that I’m not supposed to yell at her or spray her with water when she does it because it’s just her instinct to do it. Anyone experience this and know what I can do??

Update: I’m already planning to get her spayed but she hasn’t gotten all of her vaccines yet and I don’t currently have the money to get it done as I am still in school and can’t afford it immediately.