Hello!
Unfortunately this is a very common thing for hedgehogs to do to themselves but there is not a single reason as to why. I will list some of the reasons and you can rule out what you can at home, a vet is needed for the others.
!) itching: can be caused by parasites such as mites that can be diagnosed and treated by Shaymin's vet. Allergies can cause itching too but can not be diagnosed itself, it is what is left when everything else is ruled out.
2) Being overweight: If it is an older hedgehog that was overfed at its previous home this can be a cause as they traumatize their skin when normally moving around.
3) non healing trauma: If she was injured by another hedgehog or sharp cage decor and she won't leave it alone it can be difficult to heal without pain meds and antibiotics from her vet.
4) urine scald from a messy wheel: These guys sure love to run and they don't care if they pee or poop there first. Sometimes this can be prevented by letting her out or blocking her wheel when she first gets up until she goes potty somewhere else first but wheel cleaning often is still necessary.
5) behavior: Stress can cause this for many reasons and is very difficult to figure out sometimes. Below is some basic care information to start with and make sure her needs are being fully met.
Some hedgehogs can tolerate a topical antibiotic from over the counter twice daily in small amounts but others will traumatize more because of it and will need oral meds.
https://www.petcoach.co/article/african-hedgehog-husbandry-and-nutrition-housing-diet-behav/