I suggest that you let her brush her own hair. My granddaughter started brushing her own hair around that age. She also complained about how it hurt when her mother brushed it for her. Her mother "sweet talked" her into a short haircut which my granddaughter loved after she got it. It helped that my daughter, her mother,had a short cut at the time.
If, for some reason, she isn't able to or doesn't want to brush her own hair, give her a choice of getting a short style or putting up, without complaint, when you brush it. Then try to be gentle.
Do you have difficult to brush hair? If not perhaps you could talk to a friend to learn some ways, to brush tangled hair, that are more gentle. My granddaughter told me to brush in layers. First the bottom layer, then a middle layer and then last the top layer. Also to divide the hair vertically in chunks and to hold the chunk at the scalp while gently brushing starting at the ends. We also spray her hair with water. That seemed to help.
Also, remember that your daughter's scalp is more tender than yours.