How to handle it depends a bit on what your DD is like. Is she wilful, rebellious and sneaky? Or docile and compliant but easily led?
If it’s the former, keep her busy, plan family days, have a dinner party with family friends, take her out for cake, shopping or the cinema. With exam time coming up, you could also schedule tutoring after school, or say she can’t go out on school nights but can see friends at weekends. With this type of teen, coming down like a ton of bricks often backfires, as they may just lie or sneak around. Instead, ask her if she understands why socialising (and perhaps more) with an older boy could put her at risk.
If she’s more easily led, focus on helping her stand up for herself and feel comfortable setting boundaries. Invite her friends round, or organise a sleepover for a few close friends at your house. Again, booking tutoring after school could help ensure she comes straight home.
Personally, I’d generally expect my DC to come home first, do their homework, and then meet friends once everything is finished.
In any case, keep the conversation open and try not to alienate her. Talk about the power difference and ask whether she can imagine being friends with, or dating, a 10 year-old boy it can help her understand the gap in maturity.
In any case, acknowledge that this kind of attention might feel super flattering, and explore whether she feels confident in herself or perhaps a bit needy of male attention.