Parenting your kids is not the same as completely blocking them from having these sorts of interactions. Asking if your DD is comfortable with the exchange, explaining they can say so if not is parenting, blocking the boy or not allowing a boyfriend at 12 is controlling, especially given that they are only talking about hugging/holding hands.
I have regular chats to my DSs about what is appropriate, how basically if they are messaging on SM then they have to assume that it is possible that everyone will see it, including teachers.
You said were thinking of blocking the boy, I didnt see a post where you said you saw the messages, spoke to your DD about whether she was comfortable etc then decided on appropriate action together, so apologies if I missed that.
Don't assume that parents who are ok with 12/13 yos having BFs/GFs don't parent their DCs, we just have different styles and also teach trust and openess. If I banned DS from having a GF, I am under no illusions that he would probably just have one but keep it a secret. Same as kids who are never allowed out to do things, they are the ones who lie to their parents and say they are elsewhere.
My DS1 had a GF at 12, there were loads of messages saying love you, miss you etc between them. All very innocent and it was not serious really, its just how they talk. It fizzled out as of course all they really did was chat on SM and hang out with groups of mates outside of school. I kept an eye on things of course.