My 7 year old

Hey ladies . .. I'm going through a rough time with my daughter.. she is 7. I was a single parent for 5 years and went through a lot with her and at the end of each day it was her and I only. Lately she has been talking back to me. Not wanting to listen. Sometimes I feel like I had enough and spank her once .and feel gilt. I tried talking to her about her behavior and she just doesn't understand . I'm a very young mother and I'm asking for advice . Is she going through a phase of some sort ? Today she is at grandma's house because she says that I am mean and doesn't want to come home. I have being crying about this I feel so bad. I am know I've made mistakes but I don't think I have done anything to make her feel this way.. am I missing something here? I want to go I very my mom's and get her so we can talk through this. Should I go? Or give her some time and space ? 😢 my heart is broken .