Thanks for all the responses and opinions.
We do have a no-dating until 16 rule. I personally feel 12 is too young for dating and we discussed this last year when my child was leaving primary school and agreed that dating would be something for around age 16.
My concern is not just that my child likes someone. Both children seem to be deeply affectionate and romantic with each other, and I can already see certain influences which is what worried me.
We have now had a long conversation, and it seems there was also peer pressure involved: the feeling that “everyone has a relationship”, so my child felt they had to have one too and then keep it secret from us.
To clarify, when I mentioned “consequences”, I was thinking about a phone ban or restrictions, mainly because of the secrecy and the online side of things, not because I wanted to punish my child for having feelings. There is so much going on with children and the internet, so I do think it is reasonable for parents to be cautious about phones, messaging, pressure and what children are exposed to.
Regarding speaking to the school, my line of thought was really to seek guidance as I was obviously in a state of confusion and trying to work out the best way to handle it.
Having spoken to my child, we have agreed that they focus on friendships for now.
Just to add a bit more context.
Back in Year 6, my darling child had a "prom date" and was completely open about it with me. We talked about it, established it was simply a friendship. My child's date's mum and I even arranged for them to arrive at the prom in a Bentley, which they absolutely loved.
So I'm not anti-dating or against my child growing up. I'm genuinely excited for that stage of their life when they're older.